{"id":21658688,"url":"https://github.com/jonathanpalma/react-native-tesseract-ocr","last_synced_at":"2025-05-16T05:04:27.714Z","repository":{"id":11121267,"uuid":"67365257","full_name":"jonathanpalma/react-native-tesseract-ocr","owner":"jonathanpalma","description":"Tesseract OCR wrapper for React Native","archived":false,"fork":false,"pushed_at":"2025-04-26T01:29:49.000Z","size":6113,"stargazers_count":580,"open_issues_count":1,"forks_count":174,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-09T06:48:20.061Z","etag":null,"topics":["android","ocr","optical-character-recognition","react-native","tesseract","tesseract-ocr","text-detection","text-detector","text-recognition"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonathanpalma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"jonathanpalma","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-09-04T19:53:31.000Z","updated_at":"2025-04-17T20:34:18.000Z","dependencies_parsed_at":"2024-06-18T16:51:04.114Z","dependency_job_id":"ad04e601-2bc1-4db9-915e-d9ecf7726d61","html_url":"https://github.com/jonathanpalma/react-native-tesseract-ocr","commit_stats":{"total_commits":92,"total_committers":6,"mean_commits":"15.333333333333334","dds":"0.18478260869565222","last_synced_commit":"c32ac95c3a73b2eb82f322c3c277304a9145f6f1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Freact-native-tesseract-ocr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Freact-native-tesseract-ocr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Freact-native-tesseract-ocr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonathanpalma%2Freact-native-tesseract-ocr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonathanpalma","download_url":"https://codeload.github.com/jonathanpalma/react-native-tesseract-ocr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","ocr","optical-character-recognition","react-native","tesseract","tesseract-ocr","text-detection","text-detector","text-recognition"],"created_at":"2024-11-25T09:29:40.365Z","updated_at":"2025-05-16T05:04:27.686Z","avatar_url":"https://github.com/jonathanpalma.png","language":"Java","funding_links":["https://patreon.com/jonathanpalma"],"categories":["Java"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003ereact-native-tesseract-ocr 👀\u003c/h1\u003e\n  \u003cp\u003e\n  react-native-tesseract-ocr is a react-native wrapper for \u003ca href=\"https://github.com/tesseract-ocr\"\u003eTesseract OCR\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n[![Version][version-badge]][package]\n[![Install Size][size-badge]][package-size]\n[![Downloads][downloads-badge]][npmcharts]\n[![PRs Welcome][prs-badge]][prs]\n[![Commitizen friendly][cz-badge]][cz]\n[![MIT License][license-badge]][license]\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n[![Tweet][twitter-badge]][twitter]\n\nThis project uses:\n\n- [tess-two][url-tess-and] for Android\n- [Tesseract-OCR-iOS][url-tess-ios] for iOS ⚠️ (This has NOT been implemented yet) ⚠️\n\nNOTE: It is recommended to use react-native \u003e= 0.60.0\n\n## Getting started\n\n`$ npm i react-native-tesseract-ocr --save`\n\n### Mostly automatic installation\n\n`$ react-native link react-native-tesseract-ocr`\n\n\n## Example\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jonathanpalma/react-native-tesseract-ocr/master/example/showcase.android.picker.gif\" alt=\"Showcase Android using Picker\" width=\"215\" height=\"430\" style=\"margin: 0px 10px\" /\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/jonathanpalma/react-native-tesseract-ocr/master/example/showcase.android.camera.gif\" alt=\"Showcase Android using Camera\" width=\"215\" height=\"430\" style=\"margin: 0px 10px\" /\u003e\n\u003c/div\u003e\n\nCheck the example by yourself [here][url-example]\n\n## Usage\n\n### tessOptions\n\n| Property  | Type     | Description                                                                |\n| --------- | -------- | -------------------------------------------------------------------------- |\n| allowlist | `string` | List of characters you want to recognize                                   |\n| denylist  | `string` | List of characters you DON'T want to recognize                             |\n| level     | `Level`  | Level of the tokens of the page hierarchy (only used in `recognizeTokens`) |\n\n_`Level` can be one of the following values 'symbol' | 'block' | 'line' | 'paragraph' | 'word'_\n\n### recognize\n\n```typescript\nimport TesseractOcr, { LANG_ENGLISH } from 'react-native-tesseract-ocr';\n\nconst tessOptions = {};\nTesseractOcr.recognize(imageSource, LANG_ENGLISH, tessOptions);\n```\n\n### recognizeTokens\n\n```typescript\nimport TesseractOcr, { LANG_ENGLISH, LEVEL_WORD } from 'react-native-tesseract-ocr';\n\nconst tessOptions = { level: LEVEL_WORD };\nTesseractOcr.recognizeTokens(imageSource, LANG_ENGLISH, tessOptions);\n```\n\n\n### useEventListener\n\n```typescript\nimport React, { useState } from 'react';\nimport { useEventListener } from 'react-native-tesseract-ocr';\n\nfunction App() {\n  const [progress, setProgress] = useState(0);\n  useEventListener('onProgressChange', (p) =\u003e {\n    setProgress(p.percent / 100);\n  });\n\n  // return ...\n}\n```\n\n\n\n## Contributing\n\n### How to contribute?\n\nThis is a `commitizen friendly` repository, so instead of creating commits using `git commit`, please use our custom CLI by running:\n\n`$ npm run cz`\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://jonathanpalma.me\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/12414771?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonathan Palma\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/jonathanpalma/react-native-tesseract-ocr/commits?author=jonathanpalma\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/jonathanpalma/react-native-tesseract-ocr/commits?author=jonathanpalma\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#example-jonathanpalma\" title=\"Examples\"\u003e💡\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/jrunestone\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/2293001?v=4\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJohan Runsten\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/jonathanpalma/react-native-tesseract-ocr/commits?author=jrunestone\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## License\n\nMIT © [jonathanpalma](https://github.com/jonathanpalma)\n\nThis library wouldn't be possible without these amazing projects:\n\n- [Tesseract OCR][url-tesseract] - [Apache 2.0 license][url-tesseract-lsc]\n- [tess-two][url-tess-and] - [Apache 2.0 license][url-tess-and-lsc]\n\u003c!-- - [Tesseract-OCR-iOS][url-tess-ios] - [MIT license][url-tess-ios-lsc] --\u003e\n\n[downloads-badge]: https://img.shields.io/npm/dm/react-native-tesseract-ocr.svg?style=flat-square\n[license-badge]: https://img.shields.io/npm/l/react-native-tesseract-ocr.svg?style=flat-square\n[license]: https://github.com/jonathanpalma/react-native-tesseract-ocr/blob/master/LICENSE\n[npmcharts]: http://npmcharts.com/compare/react-native-tesseract-ocr\n[package-size]: https://packagephobia.now.sh/result?p=react-native-tesseract-ocr\n[package]: https://www.npmjs.com/package/react-native-tesseract-ocr\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[cz-badge]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square\n[cz]: http://commitizen.github.io/cz-cli/\n[size-badge]: https://flat.badgen.net/packagephobia/install/react-native-tesseract-ocr\n[version-badge]: https://img.shields.io/npm/v/react-native-tesseract-ocr.svg?style=flat-square\n[github-watch-badge]: https://img.shields.io/github/watchers/jonathanpalma/react-native-tesseract-ocr.svg?style=social\n[github-watch]: https://github.com/jonathanpalma/react-native-tesseract-ocr/watchers\n[github-star-badge]: https://img.shields.io/github/stars/jonathanpalma/react-native-tesseract-ocr.svg?style=social\n[github-star]: https://github.com/jonathanpalma/react-native-tesseract-ocr/stargazers\n[url-example]: https://github.com/jonathanpalma/react-native-tesseract-ocr/tree/master/example\n[url-eslint]: https://eslint.org/\n[url-prettier]: https://prettier.io/\n[url-tesseract]: https://github.com/tesseract-ocr/tesseract\n[url-tesseract-lsc]: https://github.com/tesseract-ocr/tesseract/blob/master/LICENSE\n[url-tess-and]: https://github.com/rmtheis/tess-two\n[url-tess-and-lsc]: https://github.com/rmtheis/tess-two/blob/master/COPYING\n[url-tess-ios]: https://github.com/gali8/Tesseract-OCR-iOS\n[url-tess-ios-lsc]: https://github.com/gali8/Tesseract-OCR-iOS/blob/master/LICENSE.md\n[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20react-native-tesseract-ocr!%20https://github.com/jonathanpalma/react-native-tesseract-ocr\n[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/jonathanpalma/react-native-tesseract-ocr.svg?style=social\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpalma%2Freact-native-tesseract-ocr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathanpalma%2Freact-native-tesseract-ocr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathanpalma%2Freact-native-tesseract-ocr/lists"}