Learn R Programming

SemNetCleaner (version 1.0.0)

pluralize: Converts Words to their Plural Form

Description

A function to pluralize words. The rules for converting words to their plural forms are based on the grammar rules found here: https://www.grammarly.com/blog/plural-nouns/. This function does not handle special cases, so particular care is necessary.

Usage

pluralize(word)

Arguments

word

A word

Value

Returns the word in singular form

Examples

Run this code
# NOT RUN {
"dog"
trial[1,1]

"dogs"
pluralize(trial[1,1])

"fox"
trial[15,1]

"foxes"
pluralize(trial[15,1])

"wolf"
trial[14,2]

"wolves"
pluralize(trial[14,2])

"octopi"
pluralize("octopus")

# }

Run the code above in your browser using DataLab