clean: Clean subtitles

Description Usage Arguments Value

Description

Functions to clean subtitles. clean_tags cleans formatting tags. clean_captions cleans close captions, i.e all text enclosed in parentheses or squared brackets. clean_patterns provides a more general and flexible cleaning based on regular expressions.

Usage

1
2
3
4
5
clean_tags(x, format = "srt", clean.empty = TRUE)

clean_captions(x, clean.empty = TRUE)

clean_patterns(x, pattern, clean.empty = TRUE)

Arguments

x

a subtitles or multisubtitles object.

format

the original format of the subtitles objects.

clean.empty

logical. Should empty remaining lines ("") deleted after cleaning.

pattern

a character string containing a regular expression to be matched and cleaned.

Value

A subtitles or multisubtitles object.


fkeck/subtools documentation built on Dec. 2, 2019, 3:19 a.m.