A set of tools for handling data to create GailBot plugins
Project description
GailBotPluginsTools
Overview
GailBotPluginsTools is a package designed to facilitate the creation and management of plugins for the GailBot platform. It simplifies the interaction with transcriptions, providing data handlers that manipulate XML markers and utterances.
Features
- Marker Utterance Dictionary: Efficiently manages utterances, their timings, and speaker information.
- Structured Interaction: Provides an outer layer that wraps around the marker utterance dictionary for enhanced functionality.
- Data Objects: Defines necessary data structures for handling utterances effectively.
Usage
The package includes several key modules:
marker_utterance_dict.py
- Class:
MarkerUtteranceDict
- Purpose: Creates a dictionary to manage utterances, keeping track of speaker information, start and end times, and overlaps.
- Key Methods:
__init__
: Initializes the dictionary with utterance data.turn_criteria_overlaps
: Checks if the difference between two utterances meets a defined threshold.
StructureInteract.py
- Class:
StructureInteract
- Purpose: Interacts with the marker utterance dictionary and manages the output path for plugin results.
- Key Methods:
apply
: The main driver function that processes the input data and populates the data structure.parse_xml_to_gbpluginmethods
: Converts XML data into a format usable by the GailBot Plugin methods.
data_objects.py
- Class:
UttObj
- Purpose: Defines the structure for an utterance object, encapsulating its properties like start time, end time, speaker, and text.
Installation
To install the package, use the following command:
pip install gailbottools
Example
Here is a simple example of how to use the package:
from gailbot_plugin_tools import StructureInteract
# Sample XML data
xml_data = """
<transcript>
<u speaker="Speaker1">
<w start="0.0" end="0.5">Hello</w>
<w start="0.6" end="1.0">World</w>
</u>
</transcript>
"""
# Create an instance of StructureInteract
interactor = StructureInteract()
# Apply the XML data
interactor.apply(xml_data)
Contributing
Contributions are welcome! Please submit a pull request or open an issue for suggestions and enhancements.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
- Hannah Shader
- Jason Wu
- Jacob Boyar
- Vivian Li
- Eva Caro
- Manuel Pena
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gailbottools-0.0.7.tar.gz
.
File metadata
- Download URL: gailbottools-0.0.7.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472adf36a12ef3b7ab4cafae02282a2da75f9ea248aab87bb041d419d91751b5 |
|
MD5 | bc5d6cc3931f834c57eb0b536a0b4cd9 |
|
BLAKE2b-256 | 56884be91e8f0436f81936a6fc9301b43536b2ccd3586fac7d576771dd94db22 |
File details
Details for the file GailBotTools-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: GailBotTools-0.0.7-py3-none-any.whl
- Upload date:
- Size: 17.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f40da2385fa02629bd0771b76a5ec907abafeac7f2325ee6b3c17563604682e2 |
|
MD5 | f73bd541771cd25c3c26ed45aacc6478 |
|
BLAKE2b-256 | 460e6328ba70df438eb1833e1feb8f314ef1b3e90688a8493b2f440f5f1bd7c5 |