Skip to content

Commit

Permalink
added nother header level readme
Browse files Browse the repository at this point in the history
  • Loading branch information
trinker committed Feb 27, 2017
1 parent 2f311ff commit 2c93a1d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,17 @@ 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')
stem_words(dw)
lemmatize_words(dw)
```

### "Be" Stemming vs. Lemmatizing

```{r}
bw <- c('are', 'am', 'being', 'been', 'be')
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
-----------------------------
Expand Down

0 comments on commit 2c93a1d

Please sign in to comment.