text2map: R Tools for Text Matrices
This is an R Package with libraries and utility functions for computational text analysis.
The functions are optimized for working with various kinds of text matrices. Focusing on the text matrix as the primary object – which is represented either as a base
R dense matrix or a
Matrix package sparse matrix – allows for a consistent and intuitive interface that stays close to the underlying mathematical foundation of computational text analysis. In particular, the package includes functions for working with word embeddings, text networks, and document-term matrices.
Related text datasets are available on GitLab in text2map.corpora and text dictionaries are available in text2map.dictionaries.
Install the CRAN version:
Or install the latest development version from GitLab:
Get started with “Concept Mover’s Distance by reading:
vignette("CMDist-concept-movers-distance", package = "text2map")
There are four related packages hosted on GitLab:
text2map.corpora: 13+ text datasets
text2map.dictionaries: norm dictionaries and word frequency lists
text2map.pretrained: pretrained embeddings and topic models
ggplot2aesthetics and loads viridis color scheme as default
The above packages can be installed using the following:
We welcome contributions!
For any contributions, feel free to fork the package repository on GitLab or submit pull requests. We follow the Tidyverse and rOpensci style guides (see also Advanced R). In terms of adding functions, we encourage any method that works with base R matrices or the Matrix package’s
Please report any issues or bugs here: https://gitlab.com/culturalcartography/text2map/-/issues
Any questions and requests for support can also be directed to the package maintainers (maintainers [at] textmapping [dot] com).