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 ReviewerParser

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

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

# Instantiation
reviewer = ReviewerParser([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 = ReviewerParser([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 = ReviewerParser([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.4.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.4-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reviewer-generator-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 2ab11e73bd2671051cc96f7a334d9cdcb1a19531be9c249daf865a41f59866ae
MD5 41e55f9d7b1b2b4304354e64274ff355
BLAKE2b-256 933640fcbbbbc6b1f25a1473961283c8b6c70161eaf67c964dcd0e44f4c62428

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reviewer_generator-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 57d5c2ce934f7d1e227f1624dbed8ad31c10565d36984e913425b063cc154aec
MD5 31a2b0ace2ed6721d57ed76fa88684c8
BLAKE2b-256 9a3ca8d801b133745c4706715f032d5fa98503a93e7030590ba6d37df69fd6f9

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