View source: R/corpus_export.R
| corpus_export | R Documentation |
Exports all (or some) transcript objects in a corpus object to different annotation file formats.
If only some transcripts or tiers should be affected set the parameter filterTranscriptNames and filterTierNames.
In case that you want to select transcripts and/or tiers by using regular expressions use the function act::search_makefilter first.
corpus_export(
x,
outputFolder,
filterTranscriptNames = NULL,
filterTierNames = NULL,
formats = c("eaf", "exb", "srt", "textgrid", "printtranscript"),
createMediaLinks = TRUE,
createOutputfolder = TRUE,
l = NULL
)
x |
Corpus object. |
outputFolder |
Character string; path to a folder where the transcription files will be saved. By default the forlder will be created recursively it does not exist. |
filterTranscriptNames |
Vector of character strings; names of transcripts to be included. If left unspecified, all transcripts will be exported. |
filterTierNames |
Vector of character strings; names of tiers to be included. If left unspecified, all tiers will be exported. |
formats |
Vector with one or more character strings; output formats, accepted values: 'eaf', 'exb', 'srt', 'textgrid', 'printtranscript'. If left unspecified, all supported formats will be exported. |
createMediaLinks |
Logical; if |
createOutputfolder |
Logical; if |
l |
Layout object. layout of print transcripts (affects only 'printtranscript' files). |
export_eaf, export_textgrid, import_textgrid
library(act)
# Set destination folder
outputFolder <- tempdir()
# It makes more sense, however, to you define a folder
# that is easier to access on your computer
## Not run:
outputFolder <- "PATH_TO_AN_EMPTY_FOLDER_ON_YOUR_COMPUTER"
## End(Not run)
# Exports all transcript objects in all supported formats
act::corpus_export(x=examplecorpus,
outputFolder=outputFolder)
# Exports all transcript objects in 'Praat' .TextGrid format
act::corpus_export(x=examplecorpus,
outputFolder=outputFolder,
formats="textgrid")
# Exports all transcript objects in 'ELAN' .eaf format.
# By default WITH media links
act::corpus_export(x=examplecorpus,
outputFolder=outputFolder,
formats="eaf")
# Same same, but now WITHOUT media links.
# Only Media links are only exported that are in
# the '@media.path' attribute in the transcript object(s))
act::corpus_export(x=examplecorpus,
outputFolder=outputFolder,
formats="eaf",
createMediaLinks=FALSE)
# Exports in 'ELAN' .eaf and Praat' .TextGrid format
act::corpus_export(x=examplecorpus,
outputFolder=outputFolder,
formats=c("eaf", "textgrid"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.