Split a string or group a collection of words into a list by matching another list of similar words, to create accurate subtitles from the actual script and inaccurate (generated) subtitles.
Project description
matchingsplit
Split a string or group a collection of words into a list by matching another list of similar words, to create accurate subtitles from the actual script and inaccurate (generated) subtitles.
Example
from matchingsplit import split
>>> split("this must be a good thing", reference=["this", "is", "a", "good", "thing"])
['this', 'must be', 'a', 'good', 'thing']
>>> split("this is a good thing", reference=["this", "must", "be", "a", "good", "thing"])
['this', '', 'is', 'a', 'good', 'thing']
>>> split("a big foo bar", ["a", "big", "ff"])
['a', 'big', 'foo bar']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
matchingsplit-0.1.1.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for matchingsplit-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dce6505e0e946b4a6912839351dccc7c4f21da9eee9c9e8bb6c1676b311c6f6 |
|
MD5 | 9d2f6f83319dfe7160ec381ade3a1d14 |
|
BLAKE2b-256 | 596440605a4a993e57e26450b368d5a74130f02a5e5db04105e27b8335612344 |