Giter VIP home page Giter VIP logo

react-native-tesseract-ocr's Introduction

react-native-tesseract-ocr ๐Ÿ‘€

react-native-tesseract-ocr is a react-native wrapper for Tesseract OCR

Version Install Size Downloads PRs Welcome Commitizen friendly MIT License

All Contributors

Watch on GitHub Star on GitHub Tweet

This project uses:

NOTE: It is recommended to use react-native >= 0.60.0

Getting started

$ npm i react-native-tesseract-ocr --save

Mostly automatic installation

$ react-native link react-native-tesseract-ocr

Example

Showcase Android using Picker Showcase Android using Camera

Check the example by yourself here

Usage

tessOptions

Property Type Description
allowlist string List of characters you want to recognize
denylist string List of characters you DON'T want to recognize
level Level Level of the tokens of the page hierarchy (only used in recognizeTokens)

Level can be one of the following values 'symbol' | 'block' | 'line' | 'paragraph' | 'word'

recognize

import TesseractOcr, { LANG_ENGLISH } from 'react-native-tesseract-ocr';

const tessOptions = {};
TesseractOcr.recognize(imageSource, LANG_ENGLISH, tessOptions);

recognizeTokens

import TesseractOcr, { LANG_ENGLISH, LEVEL_WORD } from 'react-native-tesseract-ocr';

const tessOptions = { level: LEVEL_WORD };
TesseractOcr.recognizeTokens(imageSource, LANG_ENGLISH, tessOptions);

useEventListener

import React, { useState } from 'react';
import { useEventListener } from 'react-native-tesseract-ocr';

function App() {
  const [progress, setProgress] = useState(0);
  useEventListener('onProgressChange', (p) => {
    setProgress(p.percent / 100);
  });

  // return ...
}

Contributing

How to contribute?

This is a commitizen friendly repository, so instead of creating commits using git commit, please use our custom CLI by running:

$ npm run cz

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Jonathan Palma

๐Ÿ’ป ๐Ÿ“– ๐Ÿ’ก

Johan Runsten

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT ยฉ jonathanpalma

This library wouldn't be possible without these amazing projects:

react-native-tesseract-ocr's People

Contributors

jonathanpalma avatar allcontributors[bot] avatar jrunestone avatar aphex3k avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.