Formats and prints text to make it more readable, especially useful in NLP tasks. It allows the option to truncate text to a specific character length and to wrap text to a specified width.
nlp_pretty_text(x, width = 50L, char_length = NULL)
The function prints formatted text and does not return a value.
nlp_pretty_text("This is an example of a longer string that will be wrapped for better readability", width = 40)
#> This is an example of a longer string
#> that will be wrapped for better
#> readability
# With character length limit
nlp_pretty_text("This is an example of a longer string", width = 40, char_length = 20)
#> This is an example o