rustling#
Submodules#
Package Contents#
- rustling.read_chat(path: str | os.PathLike[str], *, filter_files: str | Sequence[str] | None = None, filter_participants: str | Sequence[str] | None = None, cls: type[CHAT] = CHAT, strict: bool = True) CHAT#
Read CHAT data.
- Parameters:
path – Path to a
.zipfile, a local directory containing.chafiles, a single.chafile, a git repository URL (ending in.git), or an HTTP/HTTPS URL.filter_files – Filename(s) to keep. Regular expression matching is supported. If
None, all files are included.filter_participants – Participant code(s) to keep. Regular expression matching is supported. If
None, all participants are included.cls – The class used to create the reader. Must be
CHATor a subclass of it.strict – If
True, enforce strict parsing of the CHAT data.
- Returns:
A
CHATinstance filtered by the specified files and participants.- Raises:
TypeError – If cls is not
CHATor a subclass of it.ValueError – If path does not point to a recognized source.
- rustling.read_conllu(path: str | os.PathLike[str], *, cls: type[CoNLLU] = CoNLLU) CoNLLU#
Read CoNLL-U data.
- Parameters:
path – Path to a
.zipfile, a local directory containing.conllufiles, a single.conllufile, a git repository URL (ending in.git), or an HTTP/HTTPS URL.cls – The class used to create the reader. Must be
CoNLLUor a subclass of it.
- Returns:
A
CoNLLUinstance.- Raises:
TypeError – If cls is not
CoNLLUor a subclass of it.ValueError – If path does not point to a recognized source.
- rustling.read_elan(path: str | os.PathLike[str], *, cls: type[ELAN] = ELAN) ELAN#
Read ELAN data.
- Parameters:
path – Path to a
.zipfile, a local directory containing.eaffiles, a single.eaffile, a git repository URL (ending in.git), or an HTTP/HTTPS URL.cls – The class used to create the reader. Must be
ELANor a subclass of it.
- Returns:
An
ELANinstance.- Raises:
TypeError – If cls is not
ELANor a subclass of it.ValueError – If path does not point to a recognized source.
- rustling.read_srt(path: str | os.PathLike[str], *, cls: type[SRT] = SRT) SRT#
Read SRT data.
- Parameters:
path – Path to a
.zipfile, a local directory containing.srtfiles, a single.srtfile, a git repository URL (ending in.git), or an HTTP/HTTPS URL.cls – The class used to create the reader. Must be
SRTor a subclass of it.
- Returns:
An
SRTinstance.- Raises:
TypeError – If cls is not
SRTor a subclass of it.ValueError – If path does not point to a recognized source.
- rustling.read_textgrid(path: str | os.PathLike[str], *, cls: type[TextGrid] = TextGrid) TextGrid#
Read TextGrid data.
- Parameters:
path – Path to a
.zipfile, a local directory containing.TextGridfiles, a single.TextGridfile, a git repository URL (ending in.git), or an HTTP/HTTPS URL.cls – The class used to create the reader. Must be
TextGridor a subclass of it.
- Returns:
A
TextGridinstance.- Raises:
TypeError – If cls is not
TextGridor a subclass of it.ValueError – If path does not point to a recognized source.