有两个相关的函数:conpare_pinyin()
和search_easy_mistake()
。目的是比较容易读错的词语,标出其注音。主要功能有:
search_with_py(pinyin_vector) compare_pinyin(pypairs) search_easy_mistake(my_easy_mistake, onlyTheWord = FALSE)
当然,别忘了先加载宏包,否则,就要迎接出错提示。我们只需这样:
library(gmdata)
search_with_py("fu")
search_with_py(c("fu","hu"))
下面的列出搜索的结果有点长哦。
search_with_py("f")
pl <- list(c("lan","ren"),c("leng","reng")) compare_pinyin(pl)
再比较一组长的、易错的。
pl2 <- list(c("lan","ran"),c("lao","rao"),c("le","re"),c("lou","rou"),c("liang","rang"),c("long","rong"), c("lun","run"),c("leng","reng"),c("luan","ru")) compare_pinyin(pl2)
nl <- list(c("nei","lei"),c("len","nen"),c("luo","nuo")) compare_pinyin(nl)
下面是本人容易读错的字。
search_easy_mistake('初')
search_easy_mistake('婚')
search_easy_mistake('装')
search_easy_mistake("除",onlyTheWord = TRUE)
my_easy_mis <- c("审","互","复","环") lapply(my_easy_mis,search_easy_mistake)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.