act

Aligned Corpus Toolkit (act) for R

The Aligned Corpus Toolkit (act) is a R package that is designed for linguists that work with time aligned transcription data. It offers functions to

The package is itself written in R and may be expanded by other users.

Basic Information

License: GPL-3

Author: Oliver Ehmer

Email: oliver.ehmer@romanistik.uni-freiburg.de

Website: http://www.oliverehmer.de

Package website: here.

CRAN site: here

How to cite

Creating the act package took a lot of time and effort. Please cite it when you publish research.

Ehmer, Oliver (2021). act: Aligned Corpus Toolkit. R package version 1.2.2. https://cran.r-project.org/package=act

Installation

To install the package in R use the following commands.

Install from CRAN:

install.packages("act")

Install the development version from GitHub:

install.packages("remotes")
remotes::install_github("oliverehmer/act")

Load the package:

library(act)

FFmpeg (audio/video cuts, stills, burnt-in subtitles and timecode)

Cuts, stills and burnt-in text need FFmpeg together with ffprobe. act finds them in the PATH or in the usual installation folders; a different location can be set with the option act.path.ffmpeg.

FFmpeg must include the filters ass (subtitles, built with libass) and drawtext (timecode, built with freetype). Without them clips and stills without text still work, but every export with subtitles or a timecode fails.

Mac (Homebrew)

The Homebrew formula ffmpeg is built without these filters. Install ffmpeg-full instead and link it, so that it is the ffmpeg in the PATH:

brew uninstall ffmpeg
brew install ffmpeg-full
brew link --force ffmpeg-full

act also finds ffmpeg-full when it is not linked: it prefers an FFmpeg with both filters over one without.

On a Mac with Apple silicon, remove old Intel builds from /usr/local/bin (ffmpeg, ffprobe): without Rosetta they no longer start ("Bad CPU type").

Windows and Linux

On Windows use a "full" build: winget install Gyan.FFmpeg, or the release-full build from gyan.dev with its bin folder in the PATH (then restart R). The FFmpeg packages of the common Linux distributions usually include libass and freetype.

Check

ffmpeg -hide_banner -filters | grep -E " (ass|drawtext) "

must list both filters. In R, act::helper_ffmpeg_check() reports whether FFmpeg runs and which of these filters are missing (attribute filters_missing); the attribute hint holds the install commands for the running system.

Supported annotation tool formats

Related R packages

An example corpus comes with the package (act::examplecorpus, annotations only). With its media files (downloaded once from GitHub, about 64 MB):

x <- act::examplecorpus_media()

You might be interested in the following R packages, that functionally overlap with the act package.