You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using unnest_character_shingles(), you need to specify both to_lower = FALSE and lowercase = FALSE in order to not convert the tokens to lowercase. It would be nice if to_lower functioned on its own. This is with version 0.3.2
library(tidytext)
library(dplyr)
df<- tibble(text="ABC")
df %>%
unnest_character_shingles(text, text, n=2L, to_lower=FALSE)
#> # A tibble: 2 x 1#> text #> <chr>#> 1 ab #> 2 bcdf %>%
unnest_character_shingles(text, text, n=2L, lowercase=FALSE)
#> # A tibble: 2 x 1#> text #> <chr>#> 1 ab #> 2 bcdf %>%
unnest_character_shingles(text, text, n=2L, to_lower=FALSE, lowercase=FALSE)
#> # A tibble: 2 x 1#> text #> <chr>#> 1 AB #> 2 BC
library(tidytext)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, uniondf<- tibble(text="ABC")
df %>%
unnest_character_shingles(text, text, n=2L, to_lower=FALSE)
#> # A tibble: 2 × 1#> text #> <chr>#> 1 AB #> 2 BC
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
When using
unnest_character_shingles()
, you need to specify bothto_lower = FALSE
andlowercase = FALSE
in order to not convert the tokens to lowercase. It would be nice ifto_lower
functioned on its own. This is with version 0.3.2Created on 2022-04-11 by the reprex package (v2.0.0)
The text was updated successfully, but these errors were encountered: