@@ -25,6 +25,8 @@ Table of Contents
2525- [ Examples] ( #examples )
2626 - [ Load the Tools/Data] ( #load-the-toolsdata )
2727 - [ Stemming Versus Lemmatizing] ( #stemming-versus-lemmatizing )
28+ - [ "Drive" Stemming vs. Lemmatizing] ( #drive-stemming-vs-lemmatizing )
29+ - [ "Be" Stemming vs. Lemmatizing] ( #be-stemming-vs-lemmatizing )
2830 - [ Stemming] ( #stemming )
2931 - [ Lemmatizing] ( #lemmatizing )
3032 - [ Combine With Other Text Tools] ( #combine-with-other-text-tools )
@@ -120,6 +122,8 @@ Stemming Versus Lemmatizing
120122Before moving into the meat these two examples let's highlight the
121123difference between stemming and lemmatizing.
122124
125+ ### "Drive" Stemming vs. Lemmatizing
126+
123127 dw <- c('driver', 'drive', 'drove', 'driven', 'drives', 'driving')
124128
125129 stem_words(dw)
@@ -130,6 +134,8 @@ difference between stemming and lemmatizing.
130134
131135 ## [1] "driver" "drive" "drive" "drive" "drive" "drive"
132136
137+ ### "Be" Stemming vs. Lemmatizing
138+
133139 bw <- c('are', 'am', 'being', 'been', 'be')
134140
135141 stem_words(bw)
@@ -255,9 +261,9 @@ It's pretty fast too. Observe:
255261
256262 (toc <- Sys.time() - tic)
257263
258- ## Time difference of 0.09106207 secs
264+ ## Time difference of 0.09608579 secs
259265
260- That's 2,912 rows of text, or 42,708 words, in 0.09 seconds.
266+ That's 2,912 rows of text, or 42,708 words, in 0.1 seconds.
261267
262268Combine With Other Text Tools
263269-----------------------------
0 commit comments