Skip to main content

Python script for extracting,cleaning and tokenization YouTube video transcripts for Pre-Processing in machine learning.

Project description

Tube-Data: YouTube Video Transcript Extractor

Tube-Data is a Python script designed for extracting and cleaning YouTube video transcripts for preprocessing in machine learning. This versatile tool streamlines the process of acquiring high-quality text data from YouTube videos, making it ideal for various natural language processing tasks, sentiment analysis, speech recognition, and more.

Features

  • Extracts video transcripts from YouTube videos.
  • Saves cleaned transcripts into separate text files.
  • Supports individual video URLs, batch processing from a list of URLs, and entire playlists.
  • Streamlines the dataset collection process for machine learning applications.
  • New Feature: Tokenization and Punctuation Removal for text preprocessing and cleaning.

Installation

You can install the required dependencies using pip:

pip install tubelearns

Usage

Extract Transcripts from a List of Video URLs

from tubelearns import text_link

# Provide a path to a text file containing YouTube video URLs.
text_link('path_to_file.txt', name='output_folder_name')

Extract Transcript from a Single Video URL

from tubelearns import url_grab

# Provide a single YouTube video URL.
url_grab('video_url', name='output_folder_name')

Extract Transcripts from a YouTube Playlist

from tubelearns import playlist_grab

# Provide the URL of a YouTube playlist.
playlist_grab('playlist_url', name='output_folder_name')

Cleaning and Punctuation Removal

from tubelearns import Cleaning

# Initialize the Cleaning class
cleaner = Cleaning()

# Clean and remove punctuation from text
content = "Hey! hope you good"
cleaned_text = cleaner.punct_raw(content)
print(cleaned_text)

Tokenization

from tubelearns import Tokenization

# Initialize the Tokenization class
tokenizer = Tokenization()

# Tokenize text
content = "Hello sam. How are you."
tokenized_text = tokenizer.tokenize_raw(content)
print(tokenized_text)

Development Status

This project is currently in the planning stage.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributions

Contributions are welcome! Please feel free to open issues or submit pull requests.

Contact

For any inquiries or feedback, please contact KabilPreethamK.


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

tubelearns-1.1.5.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

tubelearns-1.1.5-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file tubelearns-1.1.5.tar.gz.

File metadata

  • Download URL: tubelearns-1.1.5.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tubelearns-1.1.5.tar.gz
Algorithm Hash digest
SHA256 ea4a561ae048ef6e585406c276864d7cb20e5b6218bc030094cb5bd3337dc8c5
MD5 792bd0b239e97f345e191ae1d1debbaa
BLAKE2b-256 31ffc55c38708be96c88d8e8a2560cf546bd1af8530b5a3be7601d0384994f81

See more details on using hashes here.

File details

Details for the file tubelearns-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: tubelearns-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for tubelearns-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 195d240adee8854e1a97ce980ee2b3fde2a8fd1d87535314d16bffcf1decaa3a
MD5 66f029cc3184c373b6bd0e56355b1c5f
BLAKE2b-256 67c4ad053ec02714407255d6ccbdc80714f8b7e2403742ebcbd568037f246341

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