Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get reformulator working #7

Open
wants to merge 10 commits into
base: public
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This collection of scripts is the culmination of my efforts to contributes the A

## Tools

### Illustrator
### Illustrator
Creates custom mnemonic images for your cards using AI image generation. It:
- Analyzes card content to identify key concepts
- Generates creative visual memory hooks
Expand Down Expand Up @@ -387,14 +387,21 @@ Dataset files (like `explainer_dataset.txt`, `reformulator_dataset.txt`, etc.) a
Click to read more
</summary>

First, ensure that you API keys are set in you env variables.

Next, install the [AnkiConnect](https://ankiweb.net/shared/info/2055492159) Anki addon if you don't already have it.


#### Reformulator

The reformulator expects the notes you modify to have a specific field present so that it can save the old versions and add logging. Modify the note type you want to reformulate by adding a `AnkiReformulator` field to it.
The Reformulator can be run from the command line:

```bash
python reformulator.py \
--query "(rated:2:1 OR rated:2:2) -is:suspended" \
--dataset_path "data/reformulator_dataset.txt" \
--string_formatting "data/string_formatting.py" \
--query "note:Cloze (rated:2:1 OR rated:2:2) -is:suspended" \
--dataset_path "examples/reformulator_dataset.txt" \
--string_formatting "examples/string_formatting.py" \
--ntfy_url "ntfy.sh/YOUR_TOPIC" \
--main_field_index 0 \
--llm "openai/gpt-4" \
Expand Down
Loading