View source: R/fragmentTranscripts.R
| fragmentTranscripts | R Documentation |
This is a version of getFragments that can have a dataframe of matches piped into it.
fragmentTranscripts(
matches,
layer.ids,
mime.type = "text/praat-textgrid",
path = "",
start.column = Line,
end.column = LineEnd,
labbcat.url = NULL
)
matches |
A dataframe returned by getMatches or getAllUtterances, identifying the results to which acoustic measurments should be appended. |
layer.ids |
A vector of layer IDs. |
mime.type |
Optional content-type - "text/praat-textgrid" is the default, but your LaBB-CAT installation may support other formats, which can be discovered using getSerializerDescriptors. |
path |
Optional path to directory where the files should be saved. |
start.column |
The column of |
end.column |
The column of |
labbcat.url |
URL to the LaBB-CAT instance (instead of inferring it from |
It gets fragments of transcripts from LaBB-CAT, converted to a given file format (by default, Praat TextGrid).
NB Although many formats will generate exactly one file for each interval (e.g. mime.type=text/praat-textgrid), this is not guaranteed; some formats generate a single file or a fixed collection of files regardless of how many fragments there are.
matches with the acoustic measurements appended as new columns.
processWithPraat
getMatches
Other Praat-related functions:
appendFromPraat(),
fragmentLabels(),
praatScriptCentreOfGravity(),
praatScriptFastTrack(),
praatScriptFormants(),
praatScriptIntensity(),
praatScriptPitch(),
processWithPraat()
## Not run:
## Get all tokens of "the"
the.tokens <- getMatches(labbcat.url, "the")
## Get a TextGrid for each matched utterance, including word and segment intervals
the.textgrids <- the.tokens |> fragmentTranscripts(c("utterance", "word", "segment"))
## Get a CSV for the same utterances
the.textgrids <- the.tokens |> fragmentTranscripts(
c("utterance", "word", "segment"), mime.type = "text/csv", path="csv")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.