GitHub - quanteda/quanteda: An R package for the Quantitative Analysis of Textual Data (original) (raw)
About
quanteda is an R package for managing and analyzing text, created and maintained by Kenneth Benoit and Kohei Watanabe. Its creation was funded by the European Research Council grant ERC-2011-StG 283794-QUANTESS and its continued development is supported by the Quanteda Initiative CIC.
For more details, see https://quanteda.io.
quanteda version 4
The quanteda 4.0 is a major release that improves functionality and performance and further improves function consistency by removing previously deprecated functions. It also includes significant new tokeniser rules that make the default tokeniser smarter than ever, with new Unicode and ICU-compliant rules enabling it to work more consistently with even more languages.
We describe more fully these significant changes in:
- an article about the new external pointer tokens objects;
- an article showing performance benchmarksfor the new external pointer tokens objects, as well as some of the tokeniser improvements in v4; and
- the changelog for v4a full listing of the changes, improvements, and deprecations in v4.
The quanteda family of packages
We completed the trend of splitting quanteda into modular packages with the release of v3. The quanteda family of packages includes the following:
- quanteda: contains all of the core natural language processing and textual data management functions
- quanteda.textmodels: contains all of the text models and supporting functions, namely the
textmodel_*()
functions. This was split from the main package with the v2 release - quanteda.textstats: statistics for textual data, namely the
textstat_*()
functions, split with the v3 release - quanteda.textplots: plots for textual data, namely the
textplot_*()
functions, split with the v3 release
We are working on additional package releases, available in the meantime from our GitHub pages:
- quanteda.sentiment: Functions and lexicons for sentiment analysis using dictionaries
- quanteda.tidy: Extensions for manipulating document variables in core quantedaobjects using your favourite tidyverse functions
and more to come.
How To…
Install (binaries) from CRAN
The normal way from CRAN, using your R GUI or
install.packages("quanteda")
(New for quanteda v4.0) For Linux users: Because all installations on Linux are compiled, Linux users will first need to install the Intel oneAPI Threading Building Blocks for parallel computing for installation to work.
To install TBB on Linux:
Fedora, CentOS, RHEL
sudo yum install tbb-devel
Debian and Ubuntu
sudo apt install libtbb-dev
Compile from source (macOS and Windows)
Because this compiles some C++ and Fortran source code, you will need to have installed the appropriate compilers to build the development version.
You will also need to install TBB:
macOS:
First, you will need to install XCode command line tools.
Then install the TBB libraries and the pkg-config utility: (after installing Homebrew):
brew install tbb pkg-config
Finally, you will need to installgfortran.
Windows:
Install RTools, which includes the TBB libraries.
Enable parallelisation
quanteda takes advantage of parallel computing through the TBB (Threading Building Blocks) library to speed up computations. This guide provides step-by-step instructions on how to set up your system for using Quanteda with parallel capabilities on Windows, macOS, and Linux.
Windows:
Download and install RTools from RTools download page.
macOS:
- Install XCode Command Line Tools
- Type the following command in the terminal:
- Install Homebrew
- If Homebrew is not installed, run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- If Homebrew is not installed, run:
- Install TBB and pkg-config
- After installing Homebrew, run:
brew install tbb pkg-config
- After installing Homebrew, run:
- Install gfortran
- Required for compiling Fortran code, install using Homebrew:
Linux:
Install TBB:
- For Fedora, CentOS, RHEL:
sudo yum install tbb-devel - For Debian and Ubuntu:
sudo apt install libtbb-dev
More details are provided in the quanteda documentation.
Use quanteda
See the quick start guide to learn how to usequanteda.
Get Help
- Read out documentation at https://quanteda.io.
- Check out the quantedacheatsheet.
- Submit a question on the quanteda channel on StackOverflow (questions tagged as quanteda”).
- See our tutorial site.
Cite the package
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), 774.https://doi.org/10.21105/joss.00774.
For a BibTeX entry, use the output fromcitation(package = "quanteda")
.
Leave Feedback
If you like quanteda, please consider leaving feedback or a testimonial here.
Contribute
Contributions in the form of feedback, comments, code, and bug reports are most welcome. How to contribute:
- Fork the source code, modify, and issue a pull requestthrough the project GitHub page. See our Contributor Code of Conductand the all-important quanteda Style Guide.
- Issues, bug reports, and wish lists: File a GitHub issue.
- Contact the maintainer by email.