IDEAS home Printed from https://ideas.repec.org/a/jss/jstsof/v052i06.html
   My bibliography  Save this article

The textcat Package for n-Gram Based Text Categorization in R

Author

Listed:
  • Hornik, Kurt
  • Mair, Patrick
  • Rauch, Johannes
  • Geiger, Wilhelm
  • Buchta, Christian
  • Feinerer, Ingo

Abstract

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 textcat 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.

Suggested Citation

  • Hornik, Kurt & Mair, Patrick & Rauch, Johannes & Geiger, Wilhelm & Buchta, Christian & Feinerer, Ingo, 2013. "The textcat Package for n-Gram Based Text Categorization in R," Journal of Statistical Software, Foundation for Open Access Statistics, vol. 52(i06).
  • Handle: RePEc:jss:jstsof:v:052:i06
    DOI: http://hdl.handle.net/10.18637/jss.v052.i06
    as

    Download full text from publisher

    File URL: https://www.jstatsoft.org/index.php/jss/article/view/v052i06/v52i06.pdf
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v052i06/textcat_1.0-0.tar.gz
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v052i06/v52i06.R
    Download Restriction: no

    File URL: https://www.jstatsoft.org/index.php/jss/article/downloadSuppFile/v052i06/simTCWiki.rda
    Download Restriction: no

    File URL: https://libkey.io/http://hdl.handle.net/10.18637/jss.v052.i06?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Khreisat, Laila, 2009. "A machine learning approach for Arabic text classification using N-gram frequency statistics," Journal of Informetrics, Elsevier, vol. 3(1), pages 72-77.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Curci, Ylenia & Mongeau Ospina, Christian A., 2016. "Investigating biofuels through network analysis," Energy Policy, Elsevier, vol. 97(C), pages 60-72.
    2. Liu, Yong & Teichert, Thorsten & Rossi, Matti & Li, Hongxiu & Hu, Feng, 2017. "Big data for big insights: Investigating language-specific drivers of hotel satisfaction with 412,784 user-generated reviews," Tourism Management, Elsevier, vol. 59(C), pages 554-563.
    3. Garbero, Alessandra & Carneiro, Bia & Resce, Giuliano, 2021. "Harnessing the power of machine learning analytics to understand food systems dynamics across development projects," Technological Forecasting and Social Change, Elsevier, vol. 172(C).
    4. Alessandra Garbero & Giuliano Resce & Bia Carneiro, 2021. "Spatial dynamics across food systems transformation in IFAD investments: a machine learning approach," Food Security: The Science, Sociology and Economics of Food Production and Access to Food, Springer;The International Society for Plant Pathology, vol. 13(5), pages 1125-1143, October.
    5. Lawani, Abdelaziz & Reed, Michael R. & Mark, Tyler & Zheng, Yuqing, 2019. "Reviews and price on online platforms: Evidence from sentiment analysis of Airbnb reviews in Boston," Regional Science and Urban Economics, Elsevier, vol. 75(C), pages 22-34.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Dogan, Turgut & Uysal, Alper Kursat, 2020. "A novel term weighting scheme for text classification: TF-MONO," Journal of Informetrics, Elsevier, vol. 14(4).
    2. Volkovich, Zeev & Granichin, Oleg & Redkin, Oleg & Bernikova, Olga, 2016. "Modeling and visualization of media in Arabic," Journal of Informetrics, Elsevier, vol. 10(2), pages 439-453.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:jss:jstsof:v:052:i06. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Christopher F. Baum (email available below). General contact details of provider: http://www.jstatsoft.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.