Giter VIP home page Giter VIP logo

guess-the-answer's Introduction

Guess the answer!

Guess the answer! is a general purporse Python algorithm that reads a series of questions and their answers, and tries to guess the correct answer based on the results of a Google search. It's a porting, in fact it's not so "general purporse" but it's easily adaptable to any quiz.

How to

The idea is: on the screen, there is a window with the quiz, always placed in the same position. The algorithm reads the questions and their answers by taking a screenshot and reading the text via OCR. It will try to find the correct answer thanks to (multiple) Google searches. In the best of cases, a match is found immediately, otherwise, each answer will be assigned a score indicating the "confidence" regarding its correctness. Ideally, the algorithm can be used even if the quiz is hosted on a web browser, a desktop application, or a mobile application (with the help of emulators such as BlueStack or by screen-mirroring with tools such as ScrCpy). Just set the coordinates correctly.

Installation

macOS

  1. Install Tesseract-OCR: brew install tesseract;
  2. Move Tesseract train's data from tessdata: mv tessdata/* /usr/local/share/tessdata/;
  3. (Optional) use a virtual env: python3 -m venv venv; source venv/bin/activate;
  4. Install dependencies: pip install -r requirements.txt;
  5. Set coordinates in src/Coords.py based on your screen (use shift + cmd + 4).

Linux

Same as macOS instructions but you know how to install Tesseract.

Windows

Windows support requires some changes but installation follows the same steps. The software is easily portable and I gladly accept pull requests!

Disclaimer

Developed only for educational purpose (and fun!).

guess-the-answer's People

Contributors

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