Files
2023-03-26 19:49:46 -07:00

1.8 KiB

Subtitle Files

How to load data from subtitle (.srt) files

In [24]:
from langchain.document_loaders import SRTLoader
In [25]:
loader = SRTLoader("example_data/Star_Wars_The_Clone_Wars_S06E07_Crisis_at_the_Heart.srt")
In [26]:
docs = loader.load()
In [27]:
docs[0].page_content[:100]
Out [27]:
'<i>Corruption discovered\nat the core of the Banking Clan!</i> <i>Reunited, Rush Clovis\nand Senator A'
In [ ]: