Language identification is a crucial component in the automated production of language resources, particularly in multilingual and big data contexts. However, commonly used language identifiers struggle to differentiate between similar or closely-related languages. This paper introduces FastSpell, a language identifier that combines fastText (a pre-trained language identifier tool) and Hunspell (a spell checker) with the aim of having a refined second-opinion before deciding which language should be assigned to a text. We provide a description of the FastSpell algorithm along with an explanation on how to use and configure it. To that end, we motivate the need of such a tool and present a benchmark including some popular language identifiers evaluated during the development of FastSpell. We show how FastSpell is useful not only to improve identification of similar languages, but also to identify new ones ignored by other tools.
翻译:语言识别是语言资源自动化生产中的关键组件,尤其在多语言和大数据场景下。然而,常用的语言识别工具在区分相似或高度相关的语言时存在困难。本文介绍FastSpell——一种结合fastText(预训练语言识别工具)与Hunspell(拼写检查器)的语言识别方法,旨在为文本语言归属判定提供经过精炼的二次验证。我们详细描述了FastSpell算法,并阐释了其使用与配置方法。为此,我们论证了此类工具的必要性,并展示了一项涵盖FastSpell开发过程中评估的若干主流语言识别工具的基准测试。结果表明,FastSpell不仅能有效改进相似语言的识别效果,还可识别其他工具忽略的新语言。