Skip to main content

Terminal-based test reviewer generator on formatted notes

Project description

Reviewer Generator

A small package to help you review for tests and exams based on your notes! It is a terminal-based question-and-answer reviewer.

How It Works

Reviewer Generator will read your notes formatted specifically for it. It currently supports JSON files for two (2) types of notes: (1) definitions and (2) enumerations.

Below is a sample note structure that Reviewer Generator supports:

{
  "definitions": {
    "No one | None": [
      "Who owns the internet?"
    ],
    "Internet | The Internet": [
      "It is not owned by any individual or group.",
      "It is a worldwide collection of interconnected networks (internetwork or internet for short), cooperating with each other to exchange information using common standards."
    ],
    "Small Home | Small Home Networks | Small Home Network": [
      "Connect a few computers to each other and to the internet."
    ],
    "SOHO Network | SOHO | Small Office Home Office | Small Office Home Office Network | SOHO Networks | Small Office Home Office Networks": [
      "Allows computers in a home office or a remote office to connect to a corporate network.",
      "Allows computers in a home office or a remote office to connect to a corporate network, or access centralized, shared resources."
    ],
    "Medium to Large Networks | Medium to Large | Medium to Large Network": [
      "It can have many locations with hundreds or thousands of interconnected hosts."
    ],
    "World Wide Networks | World Wide | World Wide Network": [
      "The internet is a network of networks that connects hundreds of millions of computers world-wide."
    ],
    ...
  },
  "enums": {
    "Types of Networks": [
      "Small Home | Small Home Networks | Small Home Network",
      "SOHO Network | SOHO | Small Office Home Office | Small Office Home Office Network | SOHO Networks | Small Office Home Office Networks",
      "Medium to Large Networks | Medium to Large | Medium to Large Network",
      "World Wide Networks | World Wide | World Wide Network"
    ],
    "Examples of Mobile Devices": [
      "Smartphone | Smart phone | Smart phones | Smartphones",
      "Tablet | Tablets",
      "Smart watch | Smart watch | Smart watches | Smartwatches",
      "Smart glass | Smart glasses | Smartglass | Smartglasses"
    ],
    ...
  }
}

The note structure JSON consists of two (2) main keys: (1) definitions and (2) enums. Each key consists of similarly associated values - lists or arrays.

Under definitions, the keys contain pipe (|) characters as a delimiter. This delimiter serves as a separator for each acceptable answer for the array of definitions associated with it.

Under enums, the associated values contain pipe (|) characters as a delimiter also for each acceptable answer.

Usage

Review Generator is fairly straightforward to use in your project. Below is a sample use-case scenario:

# Import Reviewer Module
from ReviewerParser import ReviewParser

# Load JSON Notes
my_notes = ReviewParser.LoadNotesFromJson(r'./Notes.json')

# Extracting each note types
definitions = my_notes['definitions']
enums = my_notes['enums']

# Instantiation
reviewer = ReviewParser([definitions], [enums], sequence=['enums'])

# Start reviewing
reviewer.start()

When loading the JSON notes, the package has an optional helper method to load the notes for you. This can be alternatively achieved by loading the JSON file yourself via the following:

import json

notes_path = r'path/to/json/notes'
with open(notes_path) as file:
  notes_dict = json.load(file)

Reviewer Options

Reviewer Generator currently supports three (3) types of questions: (1) identification, (2) enumeration, and (3) multiple choice. By default, Reviewer Generator generates these questions at random if you do not explicitly supply a sequence.

When a sequence is supplied, Reviewer Generator will generate questions following the question-type sequence provided.

# Specify sequence upon instantiation
reviewer = ReviewParser([definitions], [enums], sequence=['enums', 'qa', 'choices'])

# Specify sequence for a single session
reviewer.start(sequence=['enums', 'qa', 'choices'])

Note: The following sequence list will only recognize enums, qa, choices as valid values for the sequence

You can optionally disable all other question types and only generate specific question types.

# Specify question types upon instantiation
reviewer = ReviewParser([definitions], [enums], options={
  'identification': True,
  'multiple_choice': False,
})

# Specify question types for a single session
reviewer.start(options={
  'identification': True,
  'multiple_choice': False,
  'enumeration': True
})

Note: Omitting a question type will automatically give a False value.

Supported Question Types: identification, multiple_choice, and enumeration

Supported Types and Options

Supported Sequence Values (Used by sequence parameter)

  • enums
  • qa
  • choices

Supported Question Type Values (Used by options parameter)

  • identification
  • multiple_choice
  • enumeration

Bug Reports

There is currently no active repository for this package. For direct inquries, you can message this address: shnmyklsnc@gmail.com

Recommendations

Planned upon future releases of this package are:

  • Return a list of question-answer tuples instead of running a game loop to allow a wide range of applications of the generated questions.

  • Additional question types and options are to be added.

Collaborations are well accepted. Feedbacks and recommendations are also welcome. Email shnmyklsnc@gmail.com for those matter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reviewer-generator-0.0.3.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reviewer_generator-0.0.3-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file reviewer-generator-0.0.3.tar.gz.

File metadata

  • Download URL: reviewer-generator-0.0.3.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for reviewer-generator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 88a895066f75ae4a4d12d2ca0a9274f4ede1fc6b2336534aec02ebf5e51ef447
MD5 49f9b10692e387ffb2a344572da0d925
BLAKE2b-256 9decce3351f6946d8ecdbdef0c7a1114d44621c26c7a390129eba97c8a26a8cf

See more details on using hashes here.

File details

Details for the file reviewer_generator-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for reviewer_generator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2828e1330ce9b20949f8920f9b9320296859fc448e13d42db5ff79c56dab9da0
MD5 5c5d701f216c46030ebaedb5fa1e328b
BLAKE2b-256 2000bcf095fe67cf64a57362fa448a7d771f7b92606967c626a8b15512b24fa4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page