Last active
December 17, 2015 13:20
-
-
Save syu-id/f4bf8a2f63df2d61e497 to your computer and use it in GitHub Desktop.
学習者コーパス論 2015.12.04 作図
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
df <- read.csv('out/2015.12.04-awl_asl.csv') | |
df_plot <- df %>% | |
mutate( | |
native = plyr::revalue(native, c(en = 'L1 English ', ja='L1 Japanese')) | |
) | |
token_type <- ggplot(df_plot, aes(n_token, n_type)) + | |
facet_grid(. ~ native, scales = 'free_x') + | |
geom_point() + | |
geom_smooth() + | |
labs(x = 'Tokens in English Essays', y = 'Types') | |
token_ttr <- ggplot(df_plot, aes(n_token, ttr)) + | |
facet_grid(. ~ native, scales = 'free_x') + | |
geom_point() + | |
geom_smooth() + | |
labs(x = 'Tokens in English Essays', y = 'Type Token Ratio') | |
token_gi <- ggplot(df_plot, aes(n_token, gi)) + | |
facet_grid(. ~ native, scales = 'free_x') + | |
geom_point() + | |
geom_smooth() + | |
labs(x = 'Tokens in English Essays', y = 'Guiraud Index') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment