Description Usage Arguments Value Note Author(s) Examples
This function calculates the mertical density of given text in the form of binary stresses. It supports most common meters, but texts have to be pre-processed so that "0" represents an unstressed syllable and "1" represents a stressed syllable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
x |
A dataframe from the output of meter_yaml or a vector or a string of binary inputs. |
meter_type |
A string indicating one of the six type of stress mattern to look for |
meter_length |
A string indicating one of the six supported meter length |
secondary_stress |
A logical vector indicating whether there are encoded "2" for optional stresses. |
metrical_score |
A single numeric value which is the percentage of matched instances |
metrical_structure |
A vector indicating which possible instances have exact matches. |
This function is in essence a pattern matching algorithm with a targeted audience of literary scholars. Ideally, this function should be combined with a program or algorithm that parses raw text data.
Kevin Wang
1 2 3 | meter_score("0101010100010101010101", "iambic", "dimeter", F, F)
meter_score("0101020122010101010101", "iambic", "dimeter", T, F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.