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
19 changes: 19 additions & 0 deletions Help/markdown/vscode/prompts/01-chemical-formulas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
From scratch: chemical formulas
<!-- desc: Worked from-scratch example — gathers Wikipedia chemistry excerpts, then builds an NLP++ analyzer that finds chemical formulas and breaks each into its elements and atom counts, emitting JSON. A good first prompt to watch an analyzer built end to end. -->
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). Run an analyzer by invoking the engine executable above on an input file.

Create a folder of text files from the internet — short excerpts from Wikipedia chemistry articles that are full of chemical formulas — and save them under the analyzer's input/ directory.

Then build an NLP++ analyzer that finds the chemical formulas in the text and breaks each one into its elements and atom counts, emitting the results as JSON.

Study a couple of the example and template analyzers first to learn the conventions, then build it, run it over the files, and show me the output.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
NLP++ local install — build an analyzer
<!-- desc: Generic starting prompt — hands Claude the installed engine, example, and template paths, then asks it to build a brand-new NLP++ analyzer for a task you fill in. Use this to start any analyzer from scratch. -->
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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Create more text files for hardening
Harden analyzer
<!-- desc: Generates additional, varied test inputs (with edge cases) for the current analyzer, runs them through the engine, and reports where extraction looks wrong so you can tighten rules and re-bless regression goldens. -->
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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Build dictionaries and knowledge bases
Create Dictionaries & KBs
<!-- desc: Builds NLP++ dictionaries (.dict) and knowledge bases (.kbb) for the current analyzer, learning the exact format from the shared language and misc libraries, and places them under kb/user/. -->
Help me build dictionaries (.dict) and knowledge bases (.kbb) for an NLP++ analyzer.

- Current analyzer (its kb/user/ folder holds the KB sources): {{currentAnalyzer}}
Expand Down
Loading