Description Usage Arguments Details Author(s) Examples
View source: R/plot_word_coverage.R
Plot cumulative corpus coverage fraction of a dictionary.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## S3 method for class 'word_coverage'
plot(
  x,
  include_EOS = FALSE,
  show_limit = TRUE,
  type = "l",
  xlim = c(0, length(x)),
  ylim = c(0, 1),
  xticks = seq(from = 0, to = length(x), by = length(x)/5),
  yticks = seq(from = 0, to = 1, by = 0.25),
  xlab = "Rank",
  ylab = "Covered fraction",
  title = "Cumulative corpus coverage fraction of dictionary",
  subtitle = "_default_",
  ...
)
 | 
| x | a  | 
| include_EOS | length one logical. Should End-Of-Sentence tokens be considered in the computation of coverage fraction? | 
| show_limit | length one logical. If  | 
| type | what type of plot should be drawn, as detailed in  | 
| xlim | length two numeric. Extremes of the x-range. | 
| ylim | length two numeric. Extremes of the y-range. | 
| xticks | numeric vector. position of the x-axis ticks. | 
| yticks | numeric vector. position of the y-axis ticks. | 
| xlab | length one character. The x-axis label. | 
| ylab | length one character. The y-axis label. | 
| title | length one character. Plot title. | 
| subtitle | length one character. Plot subtitle; if "default", prints dictionary length and total covered fraction. | 
| ... | further arguments passed to or from other methods. | 
This function generates nice plots of cumulative corpus coverage
fractions. The x coordinate in the resulting plot is the word rank in the
underlying dictionary; the y coordinate at
x is the cumulative coverage fraction for rank <= x.
Valerio Gherardi
| 1 2 | c <- word_coverage(twitter_dict, twitter_test)
plot(c)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.