Giter Club home page Giter Club logo

regents-extractor's Introduction

NY Regents Extractor

Extracts multiple choice questions from NY State Regents.

Currently, output is only regular strings however this can be changed, see Formatting.

Images are not supported and won't be extracted .

Install

npm install regents-extractor

Usage

const {Exam, Document, Page, Question, TextsCollection} = require('regents-extractor');

Exam accepts a string or a buffer for the PDF and an optional string for the answers. If the answer string is provided, there must be a \t (tab) between questions and answers and a \n (line break) between questions. For example:

    "1\t4\n" +
    "2\t3\n" +

Example

See the examples folder in the repo.

Note: You must download the example regents from the commented URL for the example to work.

Formatting

Currently, the TextsCollection class toString() method simply prints the string, however this can be changed. If you would like to detect super and subscripts you can be replacing the TextsCollection toString method with your own implementation. textCollection.objs contains PDFJS objects with x, y, height, width, font size, etc. information.

I may add some simple HTML output soon, but probably not.

regents-extractor's People

Contributors

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