transcripts_cure {act} | R Documentation |
Cure all transcript objects in a corpus
Description
Transcript object may contain errors, e.g. because of defect annotation input files or user modifications. This function may cure some of these errors in all transcript objects of a corpus.
Annotations with reversed times: annotations with
endSec
lower thanstartSec
will be deleted.Overlapping annotations: earlier annotations will end where the next annotation starts.
Annotations below 0 sec: Annotations that are starting and ending before 0 sec will be deleted; Annotations starting before but ending after 0 sec will be truncated.
Missing tiers: Tiers that are present in the annotations but missing in the list of tiers in
@tiers
of the transcript object will be added.
Usage
transcripts_cure(
x,
filterTranscriptNames = NULL,
annotationsWithReversedTimes = TRUE,
overlappingAnnotations = TRUE,
annotationsWithTimesBelowZero = TRUE,
missingTiers = TRUE,
showWarning = FALSE
)
Arguments
x |
Corpus object. |
filterTranscriptNames |
Vector of character strings; names of the transcripts to be included. |
annotationsWithReversedTimes |
Logical; If |
overlappingAnnotations |
Logical; If |
annotationsWithTimesBelowZero |
Logical; If |
missingTiers |
Logical; If |
showWarning |
Logical; If |
Value
Corpus object;
See Also
Examples
library(act)
# The example corpus does not contain any errors.
# But let's use the function anyway.
x<- act::transcripts_cure(examplecorpus)
x@history[[length(x@history)]]
# See \code{act::cure_transcript} for actual examples.