Skip to content

Commit 4291d10

Browse files
authored
Merge pull request #939 from yindaheng98/main
fix: min_text_length not working
2 parents 24ea0c1 + 6696aa1 commit 4291d10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manga_translator/manga_translator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,8 @@ async def _run_textline_merge(self, config: Config, ctx: Context):
573573

574574
region.text = stripped_text.strip()
575575

576-
if len(region.text) >= config.ocr.min_text_length \
577-
and not is_valuable_text(region.text) \
576+
if len(region.text) < config.ocr.min_text_length \
577+
or not is_valuable_text(region.text) \
578578
or (not config.translator.no_text_lang_skip and langcodes.tag_distance(region.source_lang, config.translator.target_lang) == 0):
579579
if region.text.strip():
580580
logger.info(f'Filtered out: {region.text}')

0 commit comments

Comments
 (0)