通过匹配另一个类似的单词列表将字符串分割或将一组单词分组到列表中,以从实际剧本和不准确(生成)的副标题中创建准确副标题。
项目描述
matchingsplit
通过匹配另一个类似的单词列表将字符串分割或将一组单词分组到列表中,以从实际剧本和不准确(生成)的副标题中创建准确副标题。
示例
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']
>>> split("line1.\n\nline2.\nline3.", reference=["1", "2", "3"], preserve_newlines=True)
['line1.\n\n', 'line2.\n', 'line3.']
项目详情
关闭
matchingsplit-0.1.2.tar.gz 的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | be93789fcfddd9602711406853d114f825dc67bd025ab2a6130c97b573532a24 |
|
MD5 | bbe9f07b9ca72e6fbacd25426b15a681 |
|
BLAKE2b-256 | 53cf583b5c9c1fc7a31936d357d4ca0709385fa240a07acb0b9b49a0362693df |
关闭
matchingsplit-0.1.2-py3-none-any.whl 的散列值
算法 | 散列摘要 | |
---|---|---|
SHA256 | 58def0ac2c92a1003cb44ed8066b30e6a21a7bbefb48196202b8b6d358935f1c |
|
MD5 | afe9308b150f63cc50f905b15479e8b1 |
|
BLAKE2b-256 | 3b15794abbabf306400d72d3be2c33fc4de7c6c8a30de786d3acaad133a2f58b |