Fix https://github.com/AuroraWright/owocr/issues/24 and https://github.com/AuroraWright/owocr/issues/21
This commit is contained in:
@@ -199,7 +199,7 @@ class DirectoryWatcher(threading.Thread):
|
|||||||
old_paths = set()
|
old_paths = set()
|
||||||
for path in self.path.iterdir():
|
for path in self.path.iterdir():
|
||||||
if path.suffix.lower() in self.allowed_extensions:
|
if path.suffix.lower() in self.allowed_extensions:
|
||||||
old_paths.add(get_path_key(path))
|
old_paths.add(self.get_path_key(path))
|
||||||
|
|
||||||
while not terminated:
|
while not terminated:
|
||||||
if paused:
|
if paused:
|
||||||
@@ -357,7 +357,7 @@ class TextFiltering:
|
|||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
for block in new_blocks:
|
for block in new_blocks:
|
||||||
if self.classify(block)[0] == 'ja':
|
if self.classify(block)[0] in ('ja', 'zh'):
|
||||||
final_blocks.append(block)
|
final_blocks.append(block)
|
||||||
|
|
||||||
text = '\n'.join(final_blocks)
|
text = '\n'.join(final_blocks)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "owocr"
|
name = "owocr"
|
||||||
version = "1.14.2"
|
version = "1.14.3"
|
||||||
description = "Japanese OCR"
|
description = "Japanese OCR"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
Reference in New Issue
Block a user