Skip to main content

A set of tools for use in 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 gailbot_plugin_tools

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

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

gailbottools-0.0.5.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

GailBotTools-0.0.5-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file gailbottools-0.0.5.tar.gz.

File metadata

  • Download URL: gailbottools-0.0.5.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.15

File hashes

Hashes for gailbottools-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d8ef1a2983ae7e5c786ff110a9e48c58da2ec95df647fed1d9592bcf9dcd3be4
MD5 d8cd59815a12a6d231babd68f5d1d985
BLAKE2b-256 f96850dff0f9577bfcf28cfb48eeab90632ef4c3db37286985df13a5a8bc8bba

See more details on using hashes here.

File details

Details for the file GailBotTools-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: GailBotTools-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.15

File hashes

Hashes for GailBotTools-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d517ebce0e4889b6cffe3c6d7d671b2fa0dc926605e9c84655e8fa7f2a11b322
MD5 fee8089dc9eb6bf35aa3aa5581e0d569
BLAKE2b-256 0dd67677e18e7ec9e19f1456adb6ae22663a5a1301c9ec9c6e36e3b0730fb140

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page