TY - JOUR AU - Hornik, Kurt AU - Mair, Patrick AU - Rauch, Johannes AU - Geiger, Wilhelm AU - Buchta, Christian AU - Feinerer, Ingo PY - 2013/02/07 Y2 - 2024/03/28 TI - The textcat Package for n-Gram Based Text Categorization in R JF - Journal of Statistical Software JA - J. Stat. Soft. VL - 52 IS - 6 SE - Articles DO - 10.18637/jss.v052.i06 UR - https://www.jstatsoft.org/index.php/jss/article/view/v052i06 SP - 1 - 17 AB - Identifying the language used will typically be the first step in most natural language processing tasks. Among the wide variety of language identification methods discussed in the literature, the ones employing the Cavnar and Trenkle (1994) approach to text categorization based on character n-gram frequencies have been particularly successful. This paper presents the R extension package <b>textcat</b> for n-gram based text categorization which implements both the Cavnar and Trenkle approach as well as a reduced n-gram approach designed to remove redundancies of the original approach. A multi-lingual corpus obtained from the Wikipedia pages available on a selection of topics is used to illustrate the functionality of the package and the performance of the provided language identification methods. ER -