diff --git a/README.Rmd b/README.Rmd index bb10003..155b2dd 100644 --- a/README.Rmd +++ b/README.Rmd @@ -75,6 +75,8 @@ data(presidential_debates_2012) Before moving into the meat these two examples let's highlight the difference between stemming and lemmatizing. +### "Drive" Stemming vs. Lemmatizing + ```{r} dw <- c('driver', 'drive', 'drove', 'driven', 'drives', 'driving') @@ -82,6 +84,8 @@ stem_words(dw) lemmatize_words(dw) ``` +### "Be" Stemming vs. Lemmatizing + ```{r} bw <- c('are', 'am', 'being', 'been', 'be') diff --git a/README.md b/README.md index fbf96b8..f43eb32 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,8 @@ Table of Contents - [Examples](#examples) - [Load the Tools/Data](#load-the-toolsdata) - [Stemming Versus Lemmatizing](#stemming-versus-lemmatizing) + - ["Drive" Stemming vs. Lemmatizing](#drive-stemming-vs-lemmatizing) + - ["Be" Stemming vs. Lemmatizing](#be-stemming-vs-lemmatizing) - [Stemming](#stemming) - [Lemmatizing](#lemmatizing) - [Combine With Other Text Tools](#combine-with-other-text-tools) @@ -120,6 +122,8 @@ Stemming Versus Lemmatizing Before moving into the meat these two examples let's highlight the difference between stemming and lemmatizing. +### "Drive" Stemming vs. Lemmatizing + dw <- c('driver', 'drive', 'drove', 'driven', 'drives', 'driving') stem_words(dw) @@ -130,6 +134,8 @@ difference between stemming and lemmatizing. ## [1] "driver" "drive" "drive" "drive" "drive" "drive" +### "Be" Stemming vs. Lemmatizing + bw <- c('are', 'am', 'being', 'been', 'be') stem_words(bw) @@ -255,9 +261,9 @@ It's pretty fast too. Observe: (toc <- Sys.time() - tic) - ## Time difference of 0.09106207 secs + ## Time difference of 0.09608579 secs -That's 2,912 rows of text, or 42,708 words, in 0.09 seconds. +That's 2,912 rows of text, or 42,708 words, in 0.1 seconds. Combine With Other Text Tools -----------------------------