lookaround_nearby_n {SDGdetector}R Documentation

Look Around

Description

Look around to match pattern in a sentence

Usage

lookaround_nearby_n(word_ls1, word_ls2, n, exclude = "", third_AND_string = "")

Arguments

word_ls1

is a string, which includes a list of words connected by "|" that indicates 'OR'

word_ls2

is a string, which includes a list of words connected by "|" that indicates 'OR'

n

is a number, indicates the number of words to look around

exclude

is a vector, including a list of words to be excluded from match

third_AND_string

similar to word_ls1 or word_ls2, it is a string that includes a list of words connected by "|" that indicates 'OR'

Value

A regex string

Examples

con1 <- c('apple', 'bean', 'food')
con2 <- c('big', 'delicious')
lookaround_nearby_n(word_ls1 = con1, word_ls2 = con2, n = 2, exclude = "", third_AND_string = "")

[Package SDGdetector version 2.7.3 Index]