ocrmypdf-appleocr


Nameocrmypdf-appleocr JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
SummaryPlugin to run OCRmyPDF with Apple Vision Framework OCR engine
upload_time2025-11-01 12:49:33
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Masahiro Kiyota Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords pdf ocr optical character recognition apple vision ocrmypdf plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OCRmyPDF AppleOCR

This is a plugin for [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF/) that enables OCR using the text detection feature (`VNRecognizeTextRequest`) of Apple's [Vision Framework](https://developer.apple.com/documentation/vision) on macOS.

Apple's proprietary implementation offers good accuracy and speed compared to other on-device OCR engines like Tesseract.

## Installation

The package is available on [PyPI](https://pypi.org/project/ocrmypdf-appleocr/).

```bash
pip install ocrmypdf-appleocr
```

## Usage

To use the plugin, specify the `--plugin` option when running `ocrmypdf`. You can also specify the language(s) for OCR using the `-l` or `--language` option. If you want to enable automatic language detection, use `und` (undetermined) as the language code.

```bash
ocrmypdf -l jpn --plugin ocrmypdf_appleocr input.pdf output.pdf
```

Note that [`sandwich` renderer](https://ocrmypdf.readthedocs.io/en/latest/advanced.html#changing-the-pdf-renderer) is not supported on this plugin.


## Options

- `--appleocr-disable-correction`: Disable language correction in Apple Vision OCR (default: False)
- `--appleocr-recognition-level`: Recognition level for Apple Vision OCR (default: accurate). Choices are `fast` and `accurate`.
- `-l` or `--language`: Specify the language(s) for OCR in ISO 639-2 three-letter codes. Use `und` for undetermined language. Specifying multiple languages using `+` (e.g. `eng+fra`) for multilingual documents is not supported.

If you specify `und` or specify multiple languages, the plugin will attempt to detect the language using the `langdetect` library. Note that the accuracy of language detection may vary depending on the content of the document.

### Supported Languages
As of macOS Tahoe 26, the following languages are supported by Apple Vision framework for OCR:

| Language Code | Language Name    | Fast mode | Accurate mode |
|---------------|------------------|-----------|---------------|
| eng           | English          | ✓       | ✓           |
| fra           | French           | ✓       | ✓           |
| ita           | Italian          | ✓       | ✓           |
| deu           | German           | ✓       | ✓           |
| spa           | Spanish          | ✓       | ✓           |
| por           | Portuguese       | ✓       | ✓           |
| chi_sim       | Chinese (Simplified) |       | ✓           |
| chi_tra       | Chinese (Traditional) |      | ✓           |
| yue_sim       | Cantonese (Simplified) |     | ✓           |
| yue_tra       | Cantonese (Traditional) |    | ✓           |
| kor           | Korean           |           | ✓           |
| jpn           | Japanese         |           | ✓           |
| rus           | Russian          |           | ✓           |
| ukr           | Ukrainian        |           | ✓           |
| tha           | Thai             |           | ✓           |
| vie           | Vietnamese       |           | ✓           |
| ara           | Arabic           |           | ✓           |
| ars           | Arabic (Najdi)   |           | ✓           |
| tur           | Turkish          |           | ✓           |
| ind           | Indonesian       |           | ✓           |
| ces           | Czech            |           | ✓           |
| dan           | Danish           |           | ✓           |
| nld           | Dutch            |           | ✓           |
| nor           | Norwegian        |           | ✓           |
| nno           | Norwegian (Nynorsk) |        | ✓           |
| nob           | Norwegian (Bokmål) |         | ✓           |
| msa           | Malay            |           | ✓           |
| pol           | Polish           |           | ✓           |
| ron           | Romanian         |           | ✓           |
| swe           | Swedish          |           | ✓           |

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ocrmypdf-appleocr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pdf, ocr, optical character recognition, apple, vision, ocrmypdf, plugin",
    "author": null,
    "author_email": "Masahiro Kiyota <hiro@juzbox.com>",
    "download_url": "https://files.pythonhosted.org/packages/2f/cb/e77ecca4567dcb9efb6f357a9469c3b2ad7f98eeed1be4047c57dd471f74/ocrmypdf_appleocr-0.2.4.tar.gz",
    "platform": null,
    "description": "# OCRmyPDF AppleOCR\n\nThis is a plugin for [OCRmyPDF](https://github.com/ocrmypdf/OCRmyPDF/) that enables OCR using the text detection feature (`VNRecognizeTextRequest`) of Apple's [Vision Framework](https://developer.apple.com/documentation/vision) on macOS.\n\nApple's proprietary implementation offers good accuracy and speed compared to other on-device OCR engines like Tesseract.\n\n## Installation\n\nThe package is available on [PyPI](https://pypi.org/project/ocrmypdf-appleocr/).\n\n```bash\npip install ocrmypdf-appleocr\n```\n\n## Usage\n\nTo use the plugin, specify the `--plugin` option when running `ocrmypdf`. You can also specify the language(s) for OCR using the `-l` or `--language` option. If you want to enable automatic language detection, use `und` (undetermined) as the language code.\n\n```bash\nocrmypdf -l jpn --plugin ocrmypdf_appleocr input.pdf output.pdf\n```\n\nNote that [`sandwich` renderer](https://ocrmypdf.readthedocs.io/en/latest/advanced.html#changing-the-pdf-renderer) is not supported on this plugin.\n\n\n## Options\n\n- `--appleocr-disable-correction`: Disable language correction in Apple Vision OCR (default: False)\n- `--appleocr-recognition-level`: Recognition level for Apple Vision OCR (default: accurate). Choices are `fast` and `accurate`.\n- `-l` or `--language`: Specify the language(s) for OCR in ISO 639-2 three-letter codes. Use `und` for undetermined language. Specifying multiple languages using `+` (e.g. `eng+fra`) for multilingual documents is not supported.\n\nIf you specify `und` or specify multiple languages, the plugin will attempt to detect the language using the `langdetect` library. Note that the accuracy of language detection may vary depending on the content of the document.\n\n### Supported Languages\nAs of macOS Tahoe 26, the following languages are supported by Apple Vision framework for OCR:\n\n| Language Code | Language Name    | Fast mode | Accurate mode |\n|---------------|------------------|-----------|---------------|\n| eng           | English          | \u2713       | \u2713           |\n| fra           | French           | \u2713       | \u2713           |\n| ita           | Italian          | \u2713       | \u2713           |\n| deu           | German           | \u2713       | \u2713           |\n| spa           | Spanish          | \u2713       | \u2713           |\n| por           | Portuguese       | \u2713       | \u2713           |\n| chi_sim       | Chinese (Simplified) |       | \u2713           |\n| chi_tra       | Chinese (Traditional) |      | \u2713           |\n| yue_sim       | Cantonese (Simplified) |     | \u2713           |\n| yue_tra       | Cantonese (Traditional) |    | \u2713           |\n| kor           | Korean           |           | \u2713           |\n| jpn           | Japanese         |           | \u2713           |\n| rus           | Russian          |           | \u2713           |\n| ukr           | Ukrainian        |           | \u2713           |\n| tha           | Thai             |           | \u2713           |\n| vie           | Vietnamese       |           | \u2713           |\n| ara           | Arabic           |           | \u2713           |\n| ars           | Arabic (Najdi)   |           | \u2713           |\n| tur           | Turkish          |           | \u2713           |\n| ind           | Indonesian       |           | \u2713           |\n| ces           | Czech            |           | \u2713           |\n| dan           | Danish           |           | \u2713           |\n| nld           | Dutch            |           | \u2713           |\n| nor           | Norwegian        |           | \u2713           |\n| nno           | Norwegian (Nynorsk) |        | \u2713           |\n| nob           | Norwegian (Bokm\u00e5l) |         | \u2713           |\n| msa           | Malay            |           | \u2713           |\n| pol           | Polish           |           | \u2713           |\n| ron           | Romanian         |           | \u2713           |\n| swe           | Swedish          |           | \u2713           |\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Masahiro Kiyota\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Plugin to run OCRmyPDF with Apple Vision Framework OCR engine",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/mkyt/OCRmyPDF-AppleOCR",
        "Repository": "https://github.com/mkyt/OCRmyPDF-AppleOCR.git"
    },
    "split_keywords": [
        "pdf",
        " ocr",
        " optical character recognition",
        " apple",
        " vision",
        " ocrmypdf",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6d8b17083210bd9789741528883ca73d64a47815d2c88ecedb2a0194d4947670",
                "md5": "67c800bf5de7c409577798f9401aa506",
                "sha256": "9f4a0f131e7f63269d8fbbd81be88d6a6ba355d6acb525bb002f5058a8fe7992"
            },
            "downloads": -1,
            "filename": "ocrmypdf_appleocr-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "67c800bf5de7c409577798f9401aa506",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7900,
            "upload_time": "2025-11-01T12:49:32",
            "upload_time_iso_8601": "2025-11-01T12:49:32.039206Z",
            "url": "https://files.pythonhosted.org/packages/6d/8b/17083210bd9789741528883ca73d64a47815d2c88ecedb2a0194d4947670/ocrmypdf_appleocr-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2fcbe77ecca4567dcb9efb6f357a9469c3b2ad7f98eeed1be4047c57dd471f74",
                "md5": "3f43a0556d5d7a0e1aaf735709def1e6",
                "sha256": "4653cbe04180462593a762cba1ed8bb3d32938a0e06f54578db806ead6dc8edd"
            },
            "downloads": -1,
            "filename": "ocrmypdf_appleocr-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "3f43a0556d5d7a0e1aaf735709def1e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 7249,
            "upload_time": "2025-11-01T12:49:33",
            "upload_time_iso_8601": "2025-11-01T12:49:33.154235Z",
            "url": "https://files.pythonhosted.org/packages/2f/cb/e77ecca4567dcb9efb6f357a9469c3b2ad7f98eeed1be4047c57dd471f74/ocrmypdf_appleocr-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-01 12:49:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mkyt",
    "github_project": "OCRmyPDF-AppleOCR",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ocrmypdf-appleocr"
}
        
Elapsed time: 1.72770s