checking if word exist in english dictionary r

Viewed 3606

I'm performing some text analysis on mutliple resume to generate a wordcloud using wordcloud package along with tm package for preprocessing the corpus of document in R.

The problems i'm facing are :

  1. Checking whether the word in corpus have some meaning ie. it belongs to english dictionary.

  2. How to mine / process multiple resumes together.

  3. Checking for tech terms like r,java,eclipse etc.

Appreciate the help.

3 Answers

Try the dictionary R package (disclaimer: I am the maintainer of this R library)

Example

Here we get the definition of the word "hello"

word <- "hello"
word_info <- define(word)

word_info$meanings
## [[1]]
##   partOfSpeech
## 1  exclamation
## 2         noun
## 3         verb
##                                                                                definitions
## 1                used as a greeting or to begin a phone conversation., hello there, Katie!
## 2 an utterance of ‘hello’; a greeting., she was getting polite nods and hellos from people
## 3                            say or shout ‘hello’., I pressed the phone button and helloed

You can also add new words or merge two dictionaries in the following manner:

library(qdapDictionaries)

#create custom function
is.word  <- function(x) x %in% c(GradyAugmented, Dictionary2, "new_word1", "new_word2")
Related