replace_ngrams: Replace n-grams in text as single terms

Description Usage Arguments Value Examples

View source: R/generic_text_functions.R

Description

This function replaces spaces in n-grams with underscores to turn them into single tokens.

Usage

1
replace_ngrams(x, ngrams)

Arguments

x

A character vector in which to replace n-grams.

ngrams

A character vector of n-grams.

Value

The input character vector with spaces in n-grams replaced by underscores.

Examples

1
replace_ngrams("by means of natural selection", "natural selection")

elizagrames/litsearchr documentation built on April 14, 2021, 3:42 p.m.