Giter Site home page Giter Site logo

junhoyeo / kakao-gift-ocr Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 2.0 6.94 MB

🧧 OCR library for parsing data in Kakao Gift Cards

License: MIT License

TypeScript 74.62% JavaScript 25.38%
kakaotalk kakao-gift ocr ocr-parser tesseract tesseract-ocr

kakao-gift-ocr's Introduction

kakao-gift-ocr

npm version weekly downloads npm bundle size license

NPM

OCR library for parsing data in Kakao Gift Cards

πŸ“¦ Installation

npm install kakao-gift-ocr
# Or using yarn
yarn add kakao-gift-ocr

πŸ”₯ Action

import KakaoGiftOCR from 'kakao-gift-ocr';
const fs = require('fs');

const ignoreLogs = () => {};

(async () => {
  const giftCardParser = new KakaoGiftOCR(ignoreLogs);
  await giftCardParser.Ready;

  const chickenGiftCard = fs.readFileSync('./test/chicken.jpeg');
  const giftCard = await giftCardParser.getInfo(chickenGiftCard);

  console.log(giftCard);
  // {
  //   name: 'μˆœμ‚΄λΏŒλ§ν΄+콜라1.25οΌ¬[',
  //   barcode: 111420582002,
  //   dueDate: 2019-06-10T15:00:00.000Z,
  //   order: 570993632
  // }

  await giftCardParser.terminate();
})();

kakao-gift-ocr's People

Contributors

cokia avatar dependabot[bot] avatar junhoyeo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cokia rheehot

kakao-gift-ocr's Issues

Lang-data is not stored in the dist folder.

when I run
yarn
yarn build
yarn test

it makes error
1) getInfo function test should return giftCard information: Uncaught Error: Error: ENOENT: no such file or directory, open '/Users/h4nuko0n/kakao-gift-ocr/dist/data/lang-data/kor.traineddata.gz' at ChildProcess.<anonymous> (node_modules/tesseract.js/src/createWorker.js:141:15) at emit (internal/child_process.js:881:12) at processTicksAndRejections (internal/process/task_queues.js:85:21)

I think Issues where ./data is not copied to the under ./dist

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.