cleanChars: Clean all characters that are not Latin or Arabic

View source: R/stemmer.R

cleanCharsR Documentation

Clean all characters that are not Latin or Arabic

Description

Cleans any characters in string that are not in either the Latin unicode range or in the Arabic alphabet

Usage

cleanChars(texts)

Arguments

texts

A string from which characters which are not Latin or Arabic should be removed.

Value

cleanChars returns a string with only Latin and Arabic characters.

Author(s)

Rich Nielsen

Examples


## Create string with Arabic, latin, and Hebrew characters 

x <- '\u0627\u0647\u0644\u0627 \u0648\u0633\u0647\u0644\u0627 Hello \u05d0'

## Remove characters from string that are not Arabic or latin

cleanChars(x)

arabicStemR documentation built on July 18, 2022, 9:06 a.m.