Forensic Authorship Analysis

Carry out comparative authorship analysis of disputed and undisputed texts within the Likelihood Ratio Framework for expressing evidence in forensic science. This package contains implementations of well-known algorithms for comparative authorship analysis, such as Smith and Aldridge's (2011) Cosine Delta or Koppel and Winter's (2014) Impostors Method , as well as functions to measure their performance and to calibrate their outputs into Log-Likelihood Ratios.


idiolect

CRANstatus R-CMD-check

The idiolect R package is designed to provide a comprehensive suite of tools for performing comparative authorship analysis within a forensic context using the Likelihood Ratio Framework (e.g. Ishihara 2021; Nini 2023). The package contains a set of authorship analysis functions that take a set of texts as input and output scores that can then be calibrated into likelihood ratios. The package is dependent on quanteda (Benoit et al. 2018) for all Natural Language Processing functions.

Installation

You can install idiolect from CRAN:

install.packages("idiolect")

Workflow

The main functions contained in the package reflect the typical workflow for authorship analysis for forensic problems:

  1. Input data using create_corpus();

  2. Optionally mask the content/topic of the texts using contentmask();

  3. Launch an analysis (e.g. delta(), ngram_tracing(), impostors());

  4. Test the performance of the method on ground truth data using performance();

  5. Finally, apply the method to the questioned text and generate a likelihood ratio with calibrate_LLR().

Check the website and the vignette for examples.

References

Benoit, Kenneth, Kohei Watanabe, Haiyan Wang, Paul Nulty, Adam Obeng, Stefan Müller, and Akitaka Matsuo. 2018. “Quanteda: An r Package for the Quantitative Analysis of Textual Data.” Journal of Open Source Software 3 (30). https://doi.org/10.21105/joss.00774.

Ishihara, Shunichi. 2021. “Score-Based Likelihood Ratios for Linguistic Text Evidence with a Bag-of-Words Model.” Forensic Science International 327: 110980. https://doi.org/10.1016/j.forsciint.2021.110980.

Nini, Andrea. 2023. A Theory of Linguistic Individuality for Authorship Analysis. Elements in Forensic Linguistics. Cambridge, UK: Cambridge University Press.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("idiolect")

1.2.0 by Andrea Nini, 8 months ago


https://github.com/andreanini/idiolect, https://andreanini.github.io/idiolect/


Report a bug at https://github.com/andreanini/idiolect/issues


Browse source code at https://github.com/cran/idiolect


Authors: Andrea Nini [aut, cre, cph] (ORCID: , David van Leeuwen [cph] (Author of some bundled functions from package ROC)


Documentation:   PDF Manual  


GPL (>= 2) license


Imports caret, dplyr, fdrtool, ggplot2, kgrams, pbapply, pROC, proxy, quanteda.textstats, spacyr, stringr

Depends on quanteda

Suggests knitr, readtext, rmarkdown, testthat


See at CRAN