Skip to content

Commit 2f311ff

Browse files
committed
added lexicn package info
1 parent 12f71d5 commit 2f311ff

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ data(presidential_debates_2012)
7373

7474
## Stemming Versus Lemmatizing
7575

76-
Before moving into the meat these two examples highlight the difference between stemming and lemmatizing.
76+
Before moving into the meat these two examples let's highlight the difference between stemming and lemmatizing.
7777

7878
```{r}
7979
dw <- c('driver', 'drive', 'drove', 'driven', 'drives', 'driving')
@@ -110,7 +110,7 @@ stem_strings(y)
110110

111111
## Lemmatizing
112112

113-
Lemmatizing is the ["grouping together the inflected forms of a word so they can be analysed as a single item" (wikipedia)](https://en.wikipedia.org/wiki/Lemmatisation). In the example below I reduce the strings to their lemma form. `lemmatize_strings` uses a lookup dictionary. The default uses [Mechura's (2016)](http://www.lexiconista.com) English lemmatization list. The `make_lemma_dictionary` function contains two additional engines for generating a lemma lookup table for use in `lemmatize_strings`.
113+
Lemmatizing is the ["grouping together the inflected forms of a word so they can be analysed as a single item" (wikipedia)](https://en.wikipedia.org/wiki/Lemmatisation). In the example below I reduce the strings to their lemma form. `lemmatize_strings` uses a lookup dictionary. The default uses [Mechura's (2016)](http://www.lexiconista.com) English lemmatization list available from the [**lexicon**](https://cran.r-project.org/package=lexicon) package. The `make_lemma_dictionary` function contains two additional engines for generating a lemma lookup table for use in `lemmatize_strings`.
114114

115115

116116
```{r}

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ Load the Tools/Data
117117
Stemming Versus Lemmatizing
118118
---------------------------
119119

120-
Before moving into the meat these two examples highlight the difference
121-
between stemming and lemmatizing.
120+
Before moving into the meat these two examples let's highlight the
121+
difference between stemming and lemmatizing.
122122

123123
dw <- c('driver', 'drive', 'drove', 'driven', 'drives', 'driving')
124124

@@ -178,9 +178,10 @@ they can be analysed as a single item"
178178
example below I reduce the strings to their lemma form.
179179
`lemmatize_strings` uses a lookup dictionary. The default uses
180180
[Mechura's (2016)](http://www.lexiconista.com) English lemmatization
181-
list. The `make_lemma_dictionary` function contains two additional
182-
engines for generating a lemma lookup table for use in
183-
`lemmatize_strings`.
181+
list available from the
182+
[**lexicon**](https://cran.r-project.org/package=lexicon) package. The
183+
`make_lemma_dictionary` function contains two additional engines for
184+
generating a lemma lookup table for use in `lemmatize_strings`.
184185

185186
y <- c(
186187
'the dirtier dog has eaten the pies',
@@ -254,9 +255,9 @@ It's pretty fast too. Observe:
254255

255256
(toc <- Sys.time() - tic)
256257

257-
## Time difference of 0.122086 secs
258+
## Time difference of 0.09106207 secs
258259

259-
That's 2,912 rows of text, or 42,708 words, in 0.12 seconds.
260+
That's 2,912 rows of text, or 42,708 words, in 0.09 seconds.
260261

261262
Combine With Other Text Tools
262263
-----------------------------

0 commit comments

Comments
 (0)