evalTransc | R Documentation |
Check whether a Transcription Matches the Correct Value
evalTransc(filename = NULL, text, correct, alphaOnly = TRUE, matchCase = FALSE)
filename |
An RDS file output from |
text |
A character string to test against the correct transcription. Not necessary if |
correct |
A character string of the correct transcription to which |
alphaOnly |
Boolean. Should the transcription be compared only in alphabetic characters entered, ignoring any spaces, punctuation, or digits? Defaults to TRUE. |
matchCase |
Boolean. Should the comparison be case-sensitive? Defaults to FALSE. |
This function is likely not very useful on its own, except for post-processing of transcriptions entered with transcribeUI()
and transcribeServer()
. This function serves as a base for its interactive version evalTranscServer
, for giving feedback to a participant based on a transcription they've entered.
A Boolean value indicating whether the transcription in text
or filename
matches the value given in correct
(=1) or not (=0).
# Using the filename argument
transc <- "this is a sample transcription"
saveRDS(transc, "foo.rds")
is.correct <- evalTransc(filename = "foo.rds",
correct = "This is a sample transcription.")
print(is.correct)
# Using the text argument instead
# Play with the values matchCase and alphaOnly to observe changes in the returned value.
is.correct <- evalTransc(text = "this is a sample transcription",
correct = "This is a sample transcription.")
print(is.correct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.