View source: R/dictionary_meta.R
dictionary_meta | R Documentation |
Assess Dictionary Categories Within a Latent Semantic Space
dictionary_meta(dict, space = "auto", n_spaces = 5, suggest = FALSE,
suggestion_terms = 10, suggest_stopwords = FALSE,
suggest_discriminate = TRUE, expand_cutoff_freq = 0.98,
expand_cutoff_spaces = 10, dimension_prop = 1, pairwise = TRUE,
glob = TRUE, space_dir = getOption("lingmatch.lspace.dir"),
verbose = TRUE)
dict |
A vector of terms, list of such vectors, or a matrix-like object to be
categorized by |
space |
A vector space used to calculate similarities between terms.
Names of spaces (see |
n_spaces |
Number of spaces to draw from if |
suggest |
Logical; if |
suggestion_terms |
Number of terms to use when selecting suggested additions. |
suggest_stopwords |
Logical; if |
suggest_discriminate |
Logical; if |
expand_cutoff_freq |
Proportion of mapped terms to include when expanding dictionary terms.
Applies when |
expand_cutoff_spaces |
Number of spaces in which a term has to appear to be considered
for expansion. Applies when |
dimension_prop |
Proportion of dimensions to use when searching for suggested additions, where less than 1 will calculate similarities to the category core using fewer dimensions of the space. |
pairwise |
Logical; if |
glob |
Logical; if |
space_dir |
Directory from which |
verbose |
Logical; if |
A list:
expanded
: A version of dict
with fuzzy terms expanded.
summary
: A summary of each dictionary category.
terms
: Match (expanded term) similarities within terms and categories.
suggested
: If suggest
is TRUE
, a list with suggested
additions for each dictionary category. Each entry is a named numeric vector with
similarities for each suggested term.
To just expand fuzzy terms, see report_term_matches()
.
Similar information is provided in the dictionary builder web tool.
Other Dictionary functions:
download.dict()
,
lma_patcat()
,
lma_termcat()
,
read.dic()
,
report_term_matches()
,
select.dict()
if (dir.exists("~/Latent Semantic Spaces")) {
dict <- list(
furniture = c("table", "chair", "desk*", "couch*", "sofa*"),
well_adjusted = c("happy", "bright*", "friend*", "she", "he", "they")
)
dictionary_meta(dict, space_dir = "~/Latent Semantic Spaces")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.