R/ttr.R
ttr.Rd
Generate a set of basic frequency profiles of (i) token frequency, (ii) type frequency, and (iii) type per token ratio (TTR) of a particular schema (e.g., conceptual metaphor as a conceptual schema, or word-formation pattern as a morphological, constructional schema).
ttr(df = NULL, schema_var = "metaphors", lexunit_var = "lu", float_digits = 2)
df | the raw data frame containing the schemas and their linguistic instantiations (e.g., the |
---|---|
schema_var | character string of the column name for the schema variable in the data frame (i.e., |
lexunit_var | character string of the column name for the lexical unit variable realising the schema in the data frame (i.e., |
float_digits | integer indicating the retained floating points from the calculation. The default is |
A tibble data frame (tbl_df
) sorted in decreasing order of the token
frequency of the schemas.
As mentioned above, the ttr()
function can be extended beyond its use for the thesis in Rajeg (2019). It can be used to generate the three frequency profiles of a set of morphological constructional schemas in relation to their manifesting words. For instance, we can use ttr()
to determine the type and type/token ratio of two word-formation patterns, contrasting their productivity. This can be done as long as the input df
contains raw data with two columns: one representing the morphological schema and the other one representing the linguistic instantiations of each of the schema.
Rajeg, G. P. W. (2019). Metaphorical profiles and near-synonyms: A corpus-based study of Indonesian words for HAPPINESS. PhD Thesis. Monash University. Melbourne, Australia. https://doi.org/10.26180/5cac231a97fb1.
ttr_metaphor <- ttr(df = phd_data_metaphor, schema_var = "metaphors", lexunit_var = "lu", float_digits = 2)