Add langid to requirements and clarification to readme
This commit is contained in:
@@ -32,6 +32,7 @@ However:
|
||||
- for systems where text can be copied to the clipboard at the same time as images, if `*ocr_ignore*` is copied with an image, the image will be ignored
|
||||
- optionally, notifications can be enabled in the config file to show the text with a native OS notification
|
||||
- optionally, you can speed up the online providers by installing fpng-py: `pip install fpng-py` (requires a developer environment on some operating systems/Python versions)
|
||||
- optionally, you can improve filtering of non-Japanese text for screen capture by installing transformers: `pip install transformers`
|
||||
- idle resource usage on macOS and Windows when reading from the clipboard has been eliminated using native OS polling
|
||||
- a config file (to be created in `user directory/.config/owocr_config.ini`, on Windows `user directory` is the `C:\Users\yourusername` folder) can be used to configure the script, as an example to limit providers (to reduce clutter/memory usage) as well as specifying provider settings such as api keys etc. A sample config file is provided [here](https://raw.githubusercontent.com/AuroraWright/owocr/master/owocr_config.ini)
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ from PIL import UnidentifiedImageError
|
||||
from loguru import logger
|
||||
from pynput import keyboard
|
||||
from notifypy import Notify
|
||||
from pysbd import Segmenter
|
||||
|
||||
import inspect
|
||||
from owocr.ocr import *
|
||||
@@ -125,6 +124,7 @@ class TextFiltering:
|
||||
accurate_filtering = False
|
||||
|
||||
def __init__(self):
|
||||
from pysbd import Segmenter
|
||||
self.segmenter = Segmenter(language='ja', clean=True)
|
||||
try:
|
||||
from transformers import pipeline, AutoTokenizer
|
||||
|
||||
@@ -10,5 +10,6 @@ notify-py
|
||||
mss
|
||||
pywinctl
|
||||
pysbd
|
||||
langid
|
||||
pywin32;platform_system=='Windows'
|
||||
pyobjc;platform_system=='Darwin'
|
||||
3
setup.py
3
setup.py
@@ -5,7 +5,7 @@ long_description = (Path(__file__).parent / "README.md").read_text('utf-8')
|
||||
|
||||
setup(
|
||||
name="owocr",
|
||||
version='1.5',
|
||||
version='1.5.1',
|
||||
description="Japanese OCR",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
@@ -31,6 +31,7 @@ setup(
|
||||
"mss",
|
||||
"pywinctl",
|
||||
"pysbd",
|
||||
"langid",
|
||||
"pywin32;platform_system=='Windows'",
|
||||
"pyobjc;platform_system=='Darwin'"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user