一键导入
hunspell
// R hunspell package for spell checking. Use for spell checking and morphological analysis.
// R hunspell package for spell checking. Use for spell checking and morphological analysis.
R language data analysis and visualization skill. Use when user asks to (1) run R scripts or code, (2) install/update R packages, (3) perform data analysis with R, (4) create visualizations with ggplot2/plotly, (5) statistical analysis, (6) data manipulation with tidyverse/dplyr/data.table. Triggers on keywords like "R语言", "R脚本", "ggplot", "tidyverse", "数据分析", "可视化".
R DALEX package for model explanations. Use for explaining complex machine learning models.
R iml package for interpretable ML. Use for model-agnostic interpretability methods.
R lime package for local explanations. Use for explaining individual predictions with local interpretable models.
R packages for ML interpretability. Use for explaining and interpreting machine learning models.
R vip package for variable importance. Use for computing and visualizing variable importance scores.
| name | hunspell |
| description | R hunspell package for spell checking. Use for spell checking and morphological analysis. |
High-performance stemmer, tokenizer, and spell checker.
library(hunspell)
# Check spelling
hunspell("This is a tset of speling")
# Returns list of misspelled words
hunspell(c("hello", "wrold", "test"))
# Get suggestions for misspelled word
hunspell_suggest("speling")
# Multiple words
hunspell_suggest(c("speling", "wrold"))
# Check if word is correct
hunspell_check("hello")
hunspell_check("wrold")
# Multiple words
hunspell_check(c("hello", "wrold", "test"))
# Get word stems
hunspell_stem("running")
hunspell_stem("cats")
# Multiple words
hunspell_stem(c("running", "cats", "better"))
# Morphological analysis
hunspell_analyze("running")
hunspell_analyze("cats")
# List available dictionaries
list_dictionaries()
# Use specific dictionary
hunspell("bonjour", dict = "fr_FR")
# Download dictionary
# dictionary(lang = "de_DE")
# Add words to dictionary
dict <- dictionary("en_US", add_words = c("RStudio", "tidyverse"))
hunspell("RStudio", dict = dict)
# Parse text into words
hunspell_parse("This is a test sentence.")
# With format
hunspell_parse("This is a test.", format = "text")
hunspell_parse("<p>HTML text</p>", format = "html")
hunspell_parse("\\LaTeX{} text", format = "latex")
# Check document
text <- "This is a tset of the speling checker."
misspelled <- hunspell(text)[[1]]
# Get suggestions for each
suggestions <- hunspell_suggest(misspelled)