import_eaf | R Documentation |
Advice: In most situations it is more convenient to use act::corpus_new
, act::corpus_import
for importing annotation files.
Imports the contents of a 'ELAN' .eaf file and returns a transcript object.
The input to this function is either the path to an .eaf file or the contents of a .eaf file obtained from the @file.content
of an existing transcript object by readLines()
.
If you pass 'fileContent' you need to pass 'transcriptName' as parameter, too.
import_eaf(filePath = NULL, fileContent = NULL, transcriptName = NULL)
filePath |
Character string; input path of a single 'ELAN' .eaf file. |
fileContent |
Vector of character strings; contents of an 'ELAN' .eaf file read by |
transcriptName |
Character string; name of the transcript. |
Please note:
'ELAN' offers a variety of tier types, some including dependencies from other tiers. Therefore not all annotations do actually have a time value. Missing values will be detected in the superordinate tier or will be interpolated. You will not be able to recognize interpolated values in the annotations.
Please also note that dependencies between tiers in you .eaf file are not reflected in the transcript object within the act package.
Transcript object.
corpus_import
, corpus_new
, import
, import_exb
, import_rpraat
, import_textgrid
library(act)
# Path to an .eaf file that you want to read
path <- system.file("extdata", "examplecorpus", "SYNC",
"SYNC_rotar_y_flexionar.eaf", package="act")
# To import a .eaf file of your choice:
## Not run:
path <- "PATH_TO_AN_EXISTING_EAF_ON_YOUR_COMPUTER"
## End(Not run)
t <- act::import_eaf(filePath=path)
t
# Content of an .eaf file (already read by \code{readLines}),
# e.g. from an existing transcript object:
mycontent <- examplecorpus@transcripts[['SYNC_rotar_y_flexionar']]@file.content
t <- act::import_eaf(fileContent=mycontent, transcriptName="test")
t
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.