textTools0.1.0 package

Functions for Text Cleansing and Text Analysis

str_rm_words_by_length

Remove words from a vector based on the number of characters in each w...

str_stopwords_by_part_of_speech

Create a vector of English words associated with particular parts of s...

str_tolower

Calls base::tolower(), which converts letters to lowercase. Only inclu...

str_weighted_count_match

Weighted count of the words in a vector that are found in another vect...

as.text.table

Convert a data.table column of character vectors into a column with on...

flag_words

Flag rows in a text.table with specific words

l_pos

Parts of speech for English words from the Moby Project.

label_parts_of_speech

Add a column with the parts of speech for each word in a text.table

ngrams

Create n-grams

pos

Parts of speech for English words from the Moby Project.

regex_paragraph

Regular expression that might be used to split strings of text into co...

regex_sentence

Regular expression that might be used to split strings of text into co...

regex_word

Regular expression that might be used to split strings of text into co...

rm_frequent_words

Delete rows in a text.table where the number of identical records with...

rm_infrequent_words

Delete rows in a text.table where the number of identical records with...

rm_long_words

Delete rows in a text.table where the word has more than a minimum num...

rm_no_overlap

Delete rows in a text.table where the records within a group are not a...

rm_overlap

Delete rows in a text.table where the records within a group are also ...

rm_parts_of_speech

Delete rows in a text.table where the word has a certain part of speec...

rm_regexp_match

Delete rows in a text.table where the record has a certain pattern ind...

rm_short_words

Delete rows in a text.table where the word has less than a minimum num...

rm_words

Remove rows from a text.table with specific words

sampleStr

Generates (pseudo)random strings of the specified char length

stopwords

Vector of lowercase English stop words.

str_any_match

Detect if there are any words in a vector also found in another vector...

str_count_intersect

Count the intersecting words in a vector that are found in another vec...

str_count_jaccard_similarity

Calculates the intersect divided by union of two vectors of words.

str_count_match

Count the words in a vector that are found in another vector.

str_count_nomatch

Count the words in a vector that are not found in another vector.

str_count_positional_match

Count words from a vector that are found in the same position in anoth...

str_count_positional_nomatch

Count words from a vector that are not found in the same position in a...

str_count_setdiff

Count the words in a vector that don't intersect with another vector (...

str_counts

Create a list of a vector of unique words found in x and a vector of t...

str_dt_col_combine

Combine columns of a data.table into a list in a new column, wraps lis...

str_extract_match

Extract words from a vector that are found in another vector.

str_extract_nomatch

Extract words from a vector that are not found in another vector.

str_extract_positional_match

Extract words from a vector that are found in the same position in ano...

str_extract_positional_nomatch

Extract words from a vector that are not found in the same position in...

str_rm_blank_space

Remove and replace excess white space from strings.

str_rm_long_words

Remove words from a vector that have more than a maximum number of cha...

str_rm_non_alphanumeric

Remove and replace non-alphanumeric characters from strings.

str_rm_non_printable

Remove and replace non-printable characters from strings.

str_rm_numbers

Remove and replace numbers from strings.

str_rm_punctuation

Remove and replace punctuation from strings.

str_rm_regexp_match

Remove words from a vector that match a regular expression.

str_rm_short_words

Remove words from a vector that don't have a minimum number of charact...

str_rm_words

Remove words from a vector of words found in another vector of words.

A framework for text cleansing and analysis. Conveniently prepare and process large amounts of text for analysis. Includes various metrics for word counts/frequencies that scale efficiently. Quickly analyze large amounts of text data using a text.table (a data.table created with one word (or unit of text analysis) per row, similar to the tidytext format). Offers flexibility to efficiently work with text data stored in vectors as well as text data formatted as a text.table.

  • Maintainer: Timothy Conwell
  • License: GPL (>= 2)
  • Last published: 2021-02-05