Replies: 4 comments 1 reply
-
Ok, so I saw that instead of startswith, I need to put endswith. Now I have other problems, but I hope I will figure out. |
Beta Was this translation helpful? Give feedback.
-
They failed to lock because words start with a space. It should work for e98c3d6. For example, locking |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer! Also is it possible to unlock words, for example something like this: result.regroup(regroup_algo='cm_sp=.* /。/?/?/,* /,_sg=.5_mg=.3+3_sp=.* /。/?/?')
result.lock(endswith=uppercase_letters, case_sensitive=True, left=True, right=False)
result.merge_by_gap(2)
result.lock(endswith=uppercase_letters, case_sensitive=True, left=False, right=Fales)
result.lock(endswith=lowercase_letters, case_sensitive=True, left=True, right=False)
result.split_by_gap(.3) |
Beta Was this translation helpful? Give feedback.
-
One more question. In the code below, when I use split_by_length, is it possible to use lock, because it will not lock lowercase words. It would be good if it splits the first word that is not locked after max_words. result.clamp_max()
result.lock(startswith=lowercase_letters, case_sensitive=True, left=True, right=False)
result.split_by_gap(.1).split_by_length(max_words=30) Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
Hello,
I'm trying to align text with timestamps, but I'm unable to lock words that starts with lowercase letters.
So I don't want to split words to new segment that starts with lowercase letter like here:
And my code is this:
I'm probably doing something wrong, but I can't figure out what.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions