is_ngram: Validate n-gram

View source: R/is_ngram.R

is_ngramR Documentation

Validate n-gram

Description

Checks if the character string may be used as an n-gram and its notation follows specific convention of biogram package.

Usage

is_ngram(x)

Arguments

x

character string representing single n-gram.

Value

TRUE if n-gram's notation is correct, FALSE if not.

Examples

print(is_ngram("1_1.1.1_0.0"))
print(is_ngram("not_ngram"))

michbur/biogram documentation built on Feb. 4, 2024, 6:38 p.m.