Skip to content
Merged
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
14 changes: 14 additions & 0 deletions Help/markdown/vscode/prompts/01-build-analyzer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
NLP++ local install — build an analyzer
I want you to help me write a prototype NLP++ analyzer. NLP++ is a rule-based programming language for natural language processing, run by the NLP engine. Everything you need is already installed on this machine at the paths below:

- NLP engine executable (run analyzers with this): {{engineExe}}
- NLP engine command-line switches (how to run, compile, set the working directory, etc.): https://github.com/VisualText/nlp-engine/blob/master/README.md#switches
- Example analyzers (study these for patterns and the pass sequence): {{analyzersDir}}
- Analyzer templates (good starting points): {{templatesDir}}
- VisualText support files: {{visualTextDir}}
- Library functions and language dictionaries / knowledge bases: {{languagesDir}}
- Misc library functions: {{miscDir}}

An NLP++ analyzer is a folder containing: spec/ (the .nlp passes plus analyzer.seq, the ordered pass sequence), input/ (text files to analyze), and kb/ (the knowledge base). Before writing anything, read several of the example and template analyzers above to learn the analyzer.seq format, the pass structure, and the library functions and KB conventions available in the languages and misc directories. Run an analyzer by invoking the engine executable above on an input file.

Create a folder of text files from the internet that (FILL IN YOUR DESCRIPTION) and create an analyzer that does (FILL IN YOUR DESCRIPTION OF THE ANALYZER).
12 changes: 12 additions & 0 deletions Help/markdown/vscode/prompts/02-more-text-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Create more text files for hardening
I am hardening an NLP++ analyzer by adding more test inputs. The analyzer and engine are here:

- Current analyzer (add files under its input/ directory): {{currentAnalyzer}}
- NLP engine executable (run analyzers with this): {{engineExe}}
- Example analyzers (for reference on input layout): {{analyzersDir}}

Generate additional, varied text files and place them under the analyzer's input/ directory (create subfolders as needed). I want realistic variety and edge cases that will stress the analyzer's rules:

(FILL IN: the domain / kind of text, and which edge cases or variations to emphasize)

After creating them, run the analyzer over the new files with the engine executable and report any inputs where the extraction looks wrong, so I can tighten the rules and re-bless the regression goldens.
13 changes: 13 additions & 0 deletions Help/markdown/vscode/prompts/03-dictionaries-kbs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Build dictionaries and knowledge bases
Help me build dictionaries (.dict) and knowledge bases (.kbb) for an NLP++ analyzer.

- Current analyzer (its kb/user/ folder holds the KB sources): {{currentAnalyzer}}
- Shared language dictionaries / KBs to learn the format from: {{languagesDir}}
- Misc dictionaries / KBs (currencies, country codes, timezones, etc.): {{miscDir}}
- NLP engine executable: {{engineExe}}

NLP++ dictionaries are flat files of "word attr=val ..." (one word per line, .dict). Knowledge bases (.kbb) use an indented hierarchy to express concepts and their attributes. Study the examples in the directories above for the exact format, including how a .dict is paired with a .kbb of the same stem.

Build the following and place the files under the analyzer's kb/user/ directory:

(FILL IN: what the dictionary / KB should contain — the words or concepts, their attributes, and how they should be organized)
7 changes: 1 addition & 6 deletions Help/markdown/vscode/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ build your analyzer:

1. Install the **Claude Code** extension from the Extensions view.
2. Sign in to link it to your Claude subscription — the extension walks you through this.
3. Open Claude and use a starter prompt like the one below:

<!-- PLACEHOLDER: David to replace the text below with the starter prompt -->
> **Starter prompt:**
>
> _[ your starter prompt goes here ]_
3. [**Click here to create a Claude prompt**](command:helpView.createClaudePrompt) (or click **Create Claude Prompt** in the NLP++ **Help** panel). It opens a new editor with a ready-to-paste prompt — already filled in with your machine's engine, example/template analyzer, and library paths. Copy that prompt into Claude to get started.

## More help

Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Source content for VisualText's offline help system, including a precompiled `He

The markdown help system lives under [`Help/markdown/`](Help/markdown/), and the VSCode-specific help pages are under [`Help/markdown/vscode/`](Help/markdown/vscode/) (see below).

## VS Code Help, Version Notes & Announcements (`Help/markdown/vscode/`)
## VS Code Help, Version Notes, Announcements & LLM Prompts (`Help/markdown/vscode/`)

The NLP++ VSCode extension shows a **Help** view (and a 📖 book button) backed by the markdown under [`Help/markdown/vscode/`](Help/markdown/vscode/). Pages render in VS Code's markdown preview, so **keep any image in the same folder as the page that references it** — parent-folder paths like `../logo.png` are blocked by the preview's security policy.

Expand All @@ -52,6 +52,7 @@ The NLP++ VSCode extension shows a **Help** view (and a 📖 book button) backed
| `quickstart.md`, `compiling.md`, `testing.md`, `lazyload.md` | the guide pages |
| `versions/<version>.md` | **version notes** (see below) |
| `announcements/<id>.md` | **announcements** (see below) |
| `prompts/<name>.md` | **LLM prompts** (see below) |

### Version notes — `versions/<version>.md`

Expand All @@ -73,7 +74,31 @@ An announcement is a broadcast that is **independent of the extension version**.
- On a given startup the extension shows **at most one** popup: a pending version note takes priority over an announcement.
- Announcements are listed in the Help view's **Announcements** node, and the **Show Latest Announcement** (📣) button opens the newest one on demand.

> Version notes and announcements reach users only after this repo is **released** (so the files ship inside `visualtext.zip`). See [Releases](#releases).
### LLM prompts — `prompts/<name>.md`

A prompt file is a reusable, ready-to-paste prompt for an LLM (e.g. Claude) to help build or extend an analyzer. They are listed under the Help view's **LLM Prompts** node, and the **Create Claude Prompt** button (Analyzers toolbar) opens the first one.

File format:

- **The first line is the title** shown in the Help tree (a leading `#` is stripped). The rest of the file is the prompt body.
- The body may contain **`{{variable}}`** placeholders, which the extension fills in with this machine's actual paths before opening the prompt in a new editor. Clicking a prompt opens the filled-in result (the title line is dropped).

Available variables:

| Placeholder | Filled with |
| ----------- | ----------- |
| `{{engineExe}}` | full path to the NLP engine executable (`nlp.exe` / `nlp`) |
| `{{engineDir}}` | the engine's working directory |
| `{{visualTextDir}}` | the `visualText` support-files directory |
| `{{analyzersDir}}` | the example analyzers directory |
| `{{templatesDir}}` | the analyzer-templates directory |
| `{{languagesDir}}` | the per-language dictionaries / KBs directory |
| `{{miscDir}}` | the misc dictionaries / KBs directory |
| `{{currentAnalyzer}}` | the loaded analyzer's folder (or `(no analyzer loaded)`) |

An unknown `{{...}}` placeholder is left as-is. Name files with a numeric prefix (e.g. `01-build-analyzer.md`) to control their order in the list.

> Version notes, announcements, and prompts reach users only after this repo is **released** (so the files ship inside `visualtext.zip`). See [Releases](#releases).

## spec/

Expand Down
Loading