languagecheck: A Language Checking Function

Description Usage Arguments Examples

View source: R/text-functions.R

Description

This function checks if given percentage of text is in a certain language where the user supplies the list of words. For English, can use getEnglishWords() function.

Usage

1
languagecheck(text, language_list, threshold = 2/3)

Arguments

text

Character string to search.

language_list

Object containing list of words for a given language.

threshold

Value in (0, 1] above which text is considered to be a match for the language. Set to 2/3 by default.

Examples

1
languagecheck(text = some_text, language_list = eng_words, threshold = 2/3)

mdilorenzo/aidtools documentation built on May 22, 2019, 3:37 p.m.