RFPunctuation: Remove or fix punctuation.

Description Usage Arguments Value Author(s) Examples

Description

Removes punctuation characters or inserts spaces before and after them so that they can be used in text analysis as separate units.

Usage

1
RFPunctuation(texts, NoPunctuation)

Arguments

texts

A string with punctuation which should be removed or fixed.

NoPunctuation

If TRUE, the function removes punctuation. If FALSE, the function inserts spaces before and after punctuation.

Value

RFPunctuation returns a string with punctuation removed or fixed for text analysis.

Author(s)

Safshekan, Nielsen

Examples

1
2
3
4
5
6
7
8
# Create string with Persian characters and punctuation
x <- '\u062F\u0627\u0646\u0634\u06AF\u0627\u0647\u060C \u062A\u0647\u0631\u0627\u0646\u061F'

# Remove punctuation
RFPunctuation(x, NoPunctuation = TRUE)  

# Fix punctuation
RFPunctuation(x, NoPunctuation = FALSE)  

PersianStemmer documentation built on June 28, 2019, 5:03 p.m.