View source: R/curate_enntt_data.R
curate_enntt_data | R Documentation |
This function processes and curates ENNTT (European Parliament) data from a specified directory. It handles both .dat files (containing XML metadata) and .tok files '(containing text content).
curate_enntt_data(dir_path)
dir_path |
A string. The path to the directory containing the ENNTT data files. Must be an existing directory. |
The function expects a directory containing paired .dat and .tok files with matching names, as found in the raw ENNTT data https://github.com/senisioi/enntt-release. The .dat files should contain XML-formatted metadata with attributes:
session_id: Unique identifier for the parliamentary session
mepid: Member of European Parliament ID
state: Country or state representation
seq_speaker_id: Sequential ID within the session
The .tok files should contain the corresponding text content, one entry per line.
A tibble containing the curated ENNTT data with columns:
session_id: Parliamentary session identifier
speaker_id: Speaker's MEP ID
state: Representative's state/country
session_seq: Sequential position in session
text: Speech content
type: Corpus type identifier
# Example using simulated data bundled with the package
example_data <- system.file("extdata", "simul_enntt", package = "qtkit")
curated_data <- curate_enntt_data(example_data)
str(curated_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.