Index document row numbers
Examples
dubliners <- get_gutenberg_corpus(2814) |>
load_texts() |>
identify_by(part) |>
standardize_titles()
dubliners |>
add_index() |>
add_sentiment() |>
drop_na() |>
head()
#> # A tibble: 6 × 7
#> doc_id title author part word_index word sentiment
#> <fct> <chr> <chr> <chr> <int> <chr> <chr>
#> 1 The Sisters Dubliners Joyce, James THE SISTERS 48 evenly positive
#> 2 The Sisters Dubliners Joyce, James THE SISTERS 52 dead negative
#> 3 The Sisters Dubliners Joyce, James THE SISTERS 64 darkened negative
#> 4 The Sisters Dubliners Joyce, James THE SISTERS 65 blind negative
#> 5 The Sisters Dubliners Joyce, James THE SISTERS 100 idle negative
#> 6 The Sisters Dubliners Joyce, James THE SISTERS 128 strangely negative