Giter Club home page Giter Club logo

hackathon-ocr-magic's Introduction

OCR Magic

1

Presenting a React Web Application to convert Printed Text or Other Text to convert into local data using OCR, and storing the extracted data into a Database. It uses React.js for frontend, while MongoDB + GraphQL as its backend. OCR Technology is added using the Pure Javascript Multilingual OCR Library Tesseract.js

Features of Tesseract.js

  • Supports more than 100 languages
  • Automatic text orientation and script detection
  • Simple interface for reading paragraph, word, and character bounding boxes
  • It can run either in a browser and on a server with NodeJS.

Screenshots

Dashboard

1

Image Convert Screen

1

Schemas:

Document Schema:

const documentSchema = new Schema({
  content: String,
  title: String,
  date: Date,
  userId: String
});

Code Snippets

GraphQL Root Query and Mutation:

const RootQuery = new GraphQLObjectType({
  name: "RootQueryType",
  fields: {
    documents: {
      type: GraphQLList(DocumentType),
      resolve(parent, args) {
        return Document.find({});
      }
    }
  }
});

const Mutations = new GraphQLObjectType({
  name: "Mutations",
  fields: {
    addDocument: {
      type: DocumentType,
      args: {
        content: { type: new GraphQLNonNull(GraphQLString) },
        title: { type: new GraphQLNonNull(GraphQLString) },
        date: { type: new GraphQLNonNull(GraphQLDateTime) }
      },
      resolve(parent, args) {
        let document = new Document({
          content: args.content,
          title: args.title,
          date: args.date
        });
        return document.save();
      }
    }
  }
});

Resources:

  • Create a New React App - Get started with React here
  • Material-UI - React components for faster and easier web development
  • Express.js - A web application framework for Node.js
  • GraphQL - An open-source data query and manipulation language for APIs
  • Mongoose - An Object Data Modeling (ODM) library for MongoDB and Node
  • Firebase - Build apps fast, without managing infrastructure
  • Tesseract.js - The pure Javascript port of the popular Tesseract OCR engine
  • Multer - Multer is a node.js middleware for handling multipart/form-data

Available Scripts:

In the root directory, you can run: nodemon server

Server will be running at http://localhost:5001. It is required for endpoint where Tesseract.js is running.

In the server directory, you can run: nodemon server

Server will be running at http://localhost:5000. It is required for MongoDB cluster connectivity and GraphQL endpoints.

In the src directory, you can run: yarn start

The website will be live at http://localhost:3000.


This project was bootstrapped with Create React App.

Team Members:

| Amogh Warkhandkar | Omkar Bhambure |

hackathon-ocr-magic's People

Contributors

amogh-w avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.