Skip to content

debashisbiswas/word-of-the-day

Repository files navigation

Word of the Day Generator

Generates a 今日の言葉 ("Word of the Day") message for the #japanese channel in the Knights of Academia: International Discord server. Japanese learners in the community are assigned a day of the week to share a "Word of the Day" post, in which they share information about a Japanese word of their choice. The purpose of this program is to automate the process of collecting and formatting information for this weekly post.

Setup

You must be using a version of Python 3. Install the necessary requirements with

pip install -r requirements.txt

Usage

python main.py [word]

The optional 'word' argument corresponds to your selected word. When the program is run, you will be prompted to type in your word if it was not specified as an argument. The word must be in kana or kanji. If your word is a verb, it must be in dictionary form.

Output

When your word is found, the program will contain the following information, using a common post format for the #japanese channel.

  • your word
  • reading in kana (in spoiler tag)
  • pitch accent (in spoiler tag)
  • definitions (in spoiler tag)
  • a randomly selected example sentence
  • english translation of the example sentence (in spoiler tag)

Sources

JMDict is used for words and definitions, as well as the example sentences and their translations.

The ja_pitch_accent repository by kishimoto-tsuneyo on GitHub is used for pitch accent and readings.

About

Quickly generate Japanese "Word of the Day" posts

Resources

Stars

Watchers

Forks

Languages