autoscore: AutoScore

Description Usage Arguments Examples

View source: R/autoscore_fun.R

Description

The purpose of 'autoscore' is to automatically score word identification in speech perception research, such as studies involving listener understanding of speech in background noise or disordered speech. The program uses a flexible number of rules that determine whether a response set of words (i.e., listener transcriptions) match a target set of words (i.e., speech corpus). At the most basic level, Autoscore counts words in the listener transcript as correct if they match the words in the target phrase exactly (regardless of word order), or match a homophone or common misspelling of the target word. Individual rules can be applied or removed, depending on the needs of researcher and the scoring rules of the research lab. Examples of rules available in Autoscore include the ability to count as correct substitutions of articles (A for The) or differences in plural or tense (adding -s or -ed to a word). Additional rules can be added by the researcher as needed.

This function specifically takes a data frame with target words and response words and calculates the number of matches based on a number of scoring rules.

Usage

1
2
3
4
autoscore(.data, acceptable_df = NULL, plural_rule = FALSE,
  plural_add_rule = FALSE, tense_rule = FALSE,
  tense_add_rule = FALSE, a_the_rule = FALSE, root_word_rule = FALSE,
  double_letter_rule = FALSE, suffix_rule = FALSE, output = "text")

Arguments

.data

The data.frame (or tbl_df) to be used to autoscore

acceptable_df

A user-provided 'data.frame' of original and alternate spellings for words in the target/response lists (this is the acceptable_spell_rule and is in addition to built-in homophone list that can be seen with data(homophones))

plural_rule

if target or response added or subtracted -s and -es at the end of the word, count as correct (default = 'FALSE')

plural_add_rule

only if response has an additional -s or -es (not missing either at the end of the word) to be counted right. Differs from plural_rule since this can only be added to the end of the response word, not missing from it.

tense_rule

if target or response added or subtracted -d and -ed at the end of the word, count as correct (default = 'FALSE')

tense_add_rule

only if response has an additional -d or -ed (not missing either at the end of the word) to be counted right. Differs from tense_rule since this can only be added to the end of the response word, not missing from it.

a_the_rule

should "a" and "the" be considered the same? (default = 'FALSE')

root_word_rule

should a word that contains the target word at the beginning of the reponse word be considered correct (default = 'FALSE' because does "partial" matching which can bring in some unexpected results)

double_letter_rule

should double letters within a word (the t in 'attack') be considered the same as if there is only one of that latter ('atack'); some of these will be in the common_misspell_rule; default = 'FALSE'

suffix_rule

should the words be stemmed (all suffix characters removed)? (default = 'FALSE'); if 'TRUE', plural_rule and tense_rule are 'FALSE'

output

the output type for the autoscore table; current options are "text" (provides a cleaned data set) and "none" (which provides all data); others to follow soon

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(tidyverse)
library(autoscore)

data("example_data")

## Using all the defaults
autoscore(example_data)

## Using the default acceptable spellings list
example_data %>%
  autoscore::autoscore(acceptable_df = autoscore::acceptable_spellings)

## Changing some of the rules

example_data %>%
  autoscore::autoscore(acceptable_df = autoscore::acceptable_spellings,
                       plural_rule = FALSE,
                       tense_rule = FALSE)

TysonStanley/autoscore documentation built on May 29, 2019, 11:01 p.m.