Natural Language Processing

text2vec – R package – framework with API for text analysis and natural language processing

text2vec is an R package which provides an efficient framework with a concise API for text analysis and natural language processing (NLP). Fast vectorization, topic modeling, distances and GloVe word embeddings in R.

This package is efficient because it is carefully written in C++, which also means that text2vec is memory friendly. Some parts (such as GloVe) are fully parallelized using the RcppParallel package.

text2vec is inspired by gensim. The software is released under an open source license.

Key Features

  • Fast text vectorization (creation of document-term matrices) on arbitrary n-grams, using vocabulary or feature hashing.
  • GloVe word embeddings.
  • Topic modelling with:
    • Latent Dirichlet Allocation – decomposes document-term matrix into two low-rank matrices – document-topic distribution and topic-word distribution. It’s a more complex non-linear generative model.
    • Latent Semantic Analysis – oldest among topic modeling techniques. It also decomposes Document-Term matrix into a product of 2 low rank matrices.
  • Provides 2 set of functions for measuring various distances/similarity in a unified way. All methods are written with special attention to computational performance and memory efficiency. Functions for fast calculation of similarity between documents (specifically similarities and distances between matrices):
    • Cosine distance – classical approach from computational linguistics is to measure similarity based on the content overlap between documents.
    • Jaccard distance – a simple but intuitive measure of similarity between two sets.
    • Relaxed Word Mover’s Distance.
    • Euclidean – with text2vec it can only be computed on dense matrices.
  • Streaming API means that users do not have to load all the data into RAM:
    • Vectorization.
    • I/O handling.
    • Easy parallel processing – provides convenient functions for easy parallel processing of text.
    • Models – provides unified interface for models, which is inspired by scikit-learn interface. Models in text2vec are mostly transformers and decompositions.

Website: text2vec.org
Support: GitHub Code Repository
Developer: Dmitry Selivanov and contributors
License: GNU General Public License v2.0

text2vec is written in R. Learn R with our recommended free books and free tutorials.


Related Software

Natural Language Processing
PyTorch-TransformersLibrary of state-of-the-art pre-trained models
Natural Language ToolkitSuite of open source Python modules, data sets and tutorials
Stanford CoreNLPExtensible annotation-based NLP pipeline
spaCyIndustrial strength natural language processing
scikit-learnMachine learning library for Python
GensimPython-based vector space modeling and topic modeling toolkit
flairSimple framework for state-of-the-art NLP
Apache OpenNLPMachine learning based toolkit
DL4JDeploy and train deep learning models
Apache LuceneFull-featured information retrieval software library
UIMAImplementation of the UIMA specification
tidytextText mining using dplyr, ggplot2, and other tidy tools
text2vecFramework with API for text analysis and NLP
quantedaR package for Quantitative Analysis of Textual Data
MosesStatistical machine translation system

Read our verdict in the software roundup.

R Natural Language Processing Tools
tidytextText mining using dplyr, ggplot2, and other tidy tools
quantedaR package for Quantitative Analysis of Textual Data
text2vecFramework with API for text analysis and natural language processing
wordcloudCreate attractive word clouds
tmText Mining Infrastructure in R
srtringiFast and portable character string processing in R
StringrString manipulation in R
UDPipeTokenization, Tagging, Lemmatization and Dependency Parsing
tokenizersConvert natural language text into tokens
spacyrR wrapper around the Python spaCy package
Word VectorsBuild and explore embedding models
syuzhetExtraction of sentiment and sentiment-based plot arcs from text
textTinyRText processing for small or big data
sentimentrDictionary based sentiment analysis
textcleanCollection of tools to clean and normalize text
corpustoolsVarious tools for analyzing text corpora
topicmodelsInterface to LDA and CTM models
textAnalyzing natural language with transformers-based large language models
RTextToolsAutomatic text classification via supervised learning

Read our verdict in the software roundup.

C++ Natural Language Processing Tools
text2vecFramework with API for text analysis and natural language processing
MosesStatistical machine translation system
TiMBLTilburg Memory-Based Learner
MITIEMIT Information Extraction
MeTAModern C++ data sciences toolkit
Colibri CoreEfficient n-gram & skipgram modelling on text corpora
CRF++Yet Another CRF toolkit
BLLIP ParserStatistical natural language parser

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments