Skip to main content

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
  • Phi Bui

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.1.2.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GailBotTools-0.1.2-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file GailBotTools-0.1.2.tar.gz.

File metadata

  • Download URL: GailBotTools-0.1.2.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for GailBotTools-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1bd85cff651a9d227935264e1c89d01b2ca2f90fabbbde74ecea00b1476e18d6
MD5 8877ad04e9ee3bacc3e2aac4b941b746
BLAKE2b-256 bd7199351303b37ad453a42ae39c53e6c1bbb08a86200c64c03ebb6c66c96c8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: GailBotTools-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for GailBotTools-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 28af9960ef8c6b5c3de0c7af525c2115df594d7ec07d67e55ad310b6103f60d4
MD5 3941367d45aa7db24529d48bd6a34cfa
BLAKE2b-256 93ad46d8d6ef5068327bdd90d50d2f0767b43f1d00e4881f5e5948acff70ba83

See more details on using hashes here.

Supported by

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