Hunspell is the most used spellchecker in the world. It is built-in Mozilla Firefox, Google Chrome, Libre/OpenOffice, MacOS, Adobe products, and whatnot.
Thus, Hunspell dictionaries are the most common open dictionaries format; they are available for almost a hundred of world languages. The temptation to reuse those dictionaries for text processing is high: they are somewhat suitable not only for spellchecking but also for determining the canonical (base) form of words, canonical capitalization, stemming, etc.
But the dictionary format of Hunspell has a lot of peculiarities. Depending on your mindset, you might find the facts below curious, fascinating, ridiculous, or…
This is a part of the ongoing “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works, via its Python port called Spylls. You can start reading from the first part (or look into the series TOC), but this is not a requirement: I provide here all the necessary context to follow this article.
In the heart of every spellchecker is the algorithm for suggesting corrections, called just suggest in Hunspell. …
This is the fifth part of the “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works.
Today, we talk about edit-based suggestions.
Quick recap: The first part described what Hunspell is; and why I decided to rewrite it in Python. In the second and the third parts, we’ve talked about lookup: checking the word’s correctness.
The fourth part introduced suggest, an algorithm for search for corrections. We described that Hunspell performs suggest in two main stages:
This is the fourth part of the “Rebuilding the spellchecker” series, dedicated to explaining how the world’s most popular spellchecker Hunspell works.
Today’s topic is suggest!
Quick recap:
This is the third part of the “Rebuilding the spellchecker” series, dedicated to the explanation of how the world’s most popular spellchecker Hunspell works.
Quick recap:
This part is a carry-over of lookup algorithm explanation, dedicated…
This is the second part of the “Rebuilding the spellchecker” series, dedicated to the explanation of how the world’s most popular spellchecker Hunspell works. Initially published in the personal blog.
Quick recap: In the first part, I’ve described what Hunspell is; and why I decided to rewrite it in Python. It is an explanatory rewrite dedicated to uncovering the knowledge behind the Hunspell by “translating” it into a high-level language, with a lot of comments.
Now, let’s dive into how the stuff really works!
There are two main parts of word-by-word spellchecker algorithms:
A few years ago I had a fun idea for a “weekend project”: a pure-Ruby spellchecker. Ruby is my language of choice, and no-dependencies spellchecker seemed a small useful tool for the CI environment: for example, to check comments/docs spelling without installing any third-party software. I actually could’ve pulled out the project in its limited scope (only English, only spot misspelled words without fixing, limited dictionary) with just a flat list of known words, but that’s not what happened.
Back then, I decided to make a moderately generic tool, at least able to work with…
Ровно год назад мы сделали виртуальный Фестиваль Не здесь, он был забавный. И хотя в этом году на повторение события не хватило времени, сил и прочих ресурсов — в сентябре 2016-го Фестиваль Не здесь обязательно будет. А пока хочется рассказать, что это было и как это было.
Идея появилась как-то в январе 2014-го. Сейчас тяжело объяснить откуда или почему, но она возникла как-то сразу и целиком: чтение стихов вслух, автором — зачастую способ лучше их услышать и понять; видеозаписывающие устройства «домашнего качества» сейчас есть почти у всех; привычка воспринимать такое видео с собственного экрана — тоже. …
Что говорит Терминатор (и чего он не говорит) / В тексте действительно дофига спойлеров (rather all of them), beware.
Короткое вступление: не очень видно смысл рассуждать о кине с точки зрения хорошее оно или плохое («понравилось»/«не понравилось»). Мне представляется, что современные мейнстримные голливудские фильмы можно исследовать — на обывательском уровне — как разновидность фольклора: что и как авторы пытались рассказать, чтобы окупить бюджет (= чтобы понравилось соплеменникам) в большей степени рассказывает нам о соплеменниках, нежели об авторах.
Канон: будем честны, в него входит только и исключительно «Терминатор-2: Судный день» — широкое и жёсткое полотно о живых и сложных людях, которые…
Этот текст написан ради демонстрации простой мысли: всякому тексту нужна карта, и хорошо бы появились инструменты для автоматического и ручного построения таких карт.
Начнём с общего примера: мы читаем некоторый текст и хотим в нём как-то ориентироваться. В какой мы части? какие ещё части есть? как эти части связаны? где вокруг нас «более интересующие» части текста?..
Такая потребность более характерна для чтения нон-фикшн текстов, когда цель читателя — сориентироваться в новой области, прояснить связь фактов, наскоро заполнить дыры в понимании обширной темы. Но и художественному тексту карта зачастую нужна и полезна.
Если текст — территория «путешествия» (или «освоения»), то какие…
Writing in human (en/ru/ukr) and programming (rb/py/…) languages . Open source, open data, texts processing, text authoring. And stuff.