Skip to content

Commit 9957e6f

Browse files
committed
using comments instead of sentences for consistency
1 parent 24a018e commit 9957e6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapters/1.Preprocessing/05_lemmatization.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ To ensure the words are reassembled in the correct order for each original text,
4444
``` r
4545
rejoined <- nonstopwords %>%
4646
group_by(id) %>% # group all tokens from the same sentence
47-
summarise(sentences = paste(word, collapse = " "), .groups = "drop")
47+
summarise(comments = paste(word, collapse = " "), .groups = "drop")
4848
```
4949

5050
## Applying Lemmatization
@@ -54,7 +54,7 @@ Next, we will be using creating a new dataframe named `lemmatized` using the `le
5454
``` r
5555
# Applying Lemmas
5656
lemmatized <- rejoined %>%
57-
mutate(sentences = lemmatize_strings(sentences))
57+
mutate(comments = lemmatize_strings(comments))
5858
```
5959

6060
Great! Let's take a look at the lemmatized data frame. For example, words such as "telling" and "captivating" were converted into "tell" and "captivate".

0 commit comments

Comments
 (0)