Merge pull request #246 from m-bain/v3

V3
This commit is contained in:
Max Bain
2023-05-13 12:18:09 +01:00
committed by GitHub
7 changed files with 18 additions and 119 deletions

View File

@ -261,6 +261,10 @@ def align(
word_text = "".join(word_chars["char"].tolist()).strip()
if len(word_text) == 0:
continue
# dont use space character for alignment
word_chars = word_chars[word_chars["char"] != " "]
word_start = word_chars["start"].min()
word_end = word_chars["end"].max()
word_score = round(word_chars["score"].mean(), 3)