Jump to content

NLP++: Difference between revisions

From Natural Philosophy Wiki
ClaudeBot (talk | contribs)
Add Video tutorials section (Tutorials – NLP++ playlist, 18 videos) and @nlpvisualtext YouTube channel to external links
 
(41 intermediate revisions by 3 users not shown)
Line 4: Line 4:
| logo caption = The NLP++ Logo
| logo caption = The NLP++ Logo
| logo size = 150px
| logo size = 150px
| paradigms = [[Natural Language Processing]]
| paradigms = [[Natural Language Processing]], rule-based, procedural
| designer = [[Amnon Meyers]] [[David de Hilster]]
| designer = [[Amnon Meyers]] [[David de Hilster]]
| developer = Text Analysis International
| developer = Text Analysis International (1998–2018); open source since 2018
| released = {{Start date and age|df=yes|1998}}
| released = {{Start date and age|df=yes|1998}}
| latest release date = {{Start date and age|2020|11|15|df=yes}}
| latest release date = {{Start date and age|2020|11|15|df=yes}}
| platform = [[Cross Platform]]
| platform = [[Cross Platform]]
| operating system = Most major
| operating system = Linux, Windows, Mac
| file ext = .nlp, .pat, .seq, .txxt, .kb
| file ext = .nlp, .dict, .kbb, .txxt
| turing-complete = Yes
| turing-complete = Yes
| website = {{URL|https://www.visualtext.com}}
| website = {{URL|https://visualtext.org}}
}}
}}
'''NLP++''' is a computer language for natural language processing created by [[Amnon Meyers]] and [[David de Hilster]] in 1998. It includes the NLP++ language, an internal syntactic tree structure, and a hierarchical knowledge base called the [[Conceptual Grammar]]. NLP++ works in conjunction with the Integrated Development Environment [[VisualText]] which affords rapid development of text analyzers that mimic human readers. It is the only computer language that is dedicated exclusively to [[natural language processing]].
 
'''Content on this page is licensed under the [https://creativecommons.org/publicdomain/zero/1.0/deed.en Creative Commons CC0 Waivers]. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.'''
 
'''NLP++''' is a computer programming language for natural language processing created by [[Amnon Meyers]] and [[David de Hilster]] in 1998 based on a cognitive model of how humans read and understand natural language. It operates on an input text via multiple passes that elaborate a best-first parse tree. It can access and update a hierarchical knowledge base management system (KBMS) called [[Conceptual Grammar]] (CG). NLP++ and CG deploy with an Integrated Development Environment (IDE) called [[VisualText]], which supports rapid development of text analyzers. NLP++ is the only computer language exclusively dedicated to [[natural language processing]].
 
Unlike the statistical and machine-learning methods that dominate contemporary NLP, NLP++ takes a '''rule-based, "glass-box" approach''': the linguistic and world knowledge that drives an analyzer is written by a human, in code that a human can read, audit, and fix. Because analyzers are deterministic and run on their own — with no trained model required — their behavior is repeatable and their decisions can be traced, making NLP++ suited to high-stakes domains where accountability and explainability matter.


== Overview ==
== Overview ==
NLP++ is a computer language specifically dedicated for building natural language processors of text. It allows programmers to capture linguistic and world knowledge along with the process by which humans read and understand text. NLP++ combines bottom up, island-driven sequential processing in conjunction with a dynamic hierarchical knowledge base called the conceptual grammar. NLP++ can dynamically build knowledge and use stored knowledge in order to aid in the task of understanding written text. It's scope in processing text runs from simple syntactic processing and matching to full-blown natural language understanding. NLP++ is a language, not a toolkit so all analyzers must be created from scratch for each application.
NLP++ is a computer language dedicated to building natural language text analyzers. It allows programmers to capture and apply linguistic and world knowledge, emulating processes by which humans read and understand text. NLP++ combines bottom up, island-driven, recursive grammar, and other methods in a multi-pass architecture that operates on one parse tree. It works with a hierarchical knowledge base (KB), called Conceptual Grammar (CG), to dynamically build and use stored knowledge in analyzing text. Applications range from simple syntactic processing to full natural language understanding. VisualText is a developer's environment that exploits NLP++ and CG to rapidly elaborate text analyzers.  Passes and KBs from one analyzer may be exploited to more rapidly construct and tailor new text analyzers.


=== NLP++ ===
=== NLP++ ===
NLP++ is a computer language that takes text, breaks it down into tokens, builds up those tokens into syntactic trees, and builds and uses knowledge stored in the conceptual grammar. The language includes functions, rules, local variables specific to its internal representations of text and knowledge.
NLP++ is a computer language that takes text, breaks it down into tokens, builds up those tokens into syntactic trees, and builds and uses knowledge stored in Conceptual Grammar. The language includes functions, rules, operators, and variables specific to its internal representations of text and knowledge.  NLP++ comprises general C or C++-lke programming language constructs, as well as integrally addressing rule matches and the associated knowledge base.


==== Variables ====
==== Variables ====
Variables are written with a single letter and a string name. There are special variable types in NLP++ that are used in specific contexts.
Variables are written with a single letter and a string name. Special variable types in NLP++ apply to specific contexts.


{| class="wikitable"
{| class="wikitable"
Line 59: Line 64:


==== Regions ====
==== Regions ====
There are numerous regions in NLP++ files:  
There are numerous regions in NLP++ files:


{| class="wikitable"
{| class="wikitable"
Line 87: Line 92:
|-
|-
|@PRE
|@PRE
|Specifies a region of post processing for a rule or rules
|Specifies a region of preprocessing for a rule or rules
|Comes right before the @RULES region
|Comes right before the @RULES region
|-
|-
|@CHECK
|@CHECK
|Specifies certain conditions on rule nodes before trying to make the rule
|Specifies certain conditions on rule nodes before trying to match the rule
|Comes right before the @POST or @RULES region
|Comes right before the @POST or @RULES region
|-
|-
Line 118: Line 123:
==== Built In Functions ====
==== Built In Functions ====
NLP++ has built in functions for the following areas:
NLP++ has built in functions for the following areas:
* Database Functions
* Formatting and I/O Functions
* Knowledge Base Functions
* Knowledge Base Functions
* Math Functions
* Parse Tree Functions
* Parse Tree Functions
* String Functions
* Special Functions
* Special Functions
* Math Functions
* Spelling Functions
* Spelling Functions
* String Functions
* Formatting and I/O Functions
* Web Functions
* Web Functions
* Database Functions
==== Analyzer Sequence ====
[[File:AnalyzerSequence.png|thumb|Analyzer sequence display of the full English parser written by Amnon Meyers]]
The analyzer sequence in NLP++ is a linear pipeline of executed NLP++ code. This code can contain rules, function declarations, or pure NLP++ code.
This facilitates bottom-up, island-driven parsing which is much more efficient that the combinatoric traversing of full grammars.
The analyzer sequence is contained in the file "analyzer.seq". Here is the analyzer sequence for a date-time analyzer:
<pre>
dicttokz nil
nlp init
nlp KBFuncs
nlp funcs
nlp LinesDictTokZ
nlp numbers
nlp ordinals
nlp times
nlp zulu
nlp timePhrases
nlp dates
nlp datesDay
nlp dateTime
nlp datePhrases
nlp splice
nlp kb
nlp output
</pre>


==== User Functions ====
==== User Functions ====
Line 137: Line 170:
[[File:VisualText2IDE.png|thumb|VisualText version 2 for Windows]]
[[File:VisualText2IDE.png|thumb|VisualText version 2 for Windows]]
VisualText is an [[IDE]] that is specifically built to edit, run, and debug NLP++ text analyzers. It includes a text director of texts to process, a special editor for NLP++, text highlighting of matching rules for each sequential pass of rule patterns, and tree visualizations for the syntactic tree as well as the hierarchical knowledge base. It also has the ability to quickly generate rules directly from text.
VisualText is an [[IDE]] that is specifically built to edit, run, and debug NLP++ text analyzers. It includes a text director of texts to process, a special editor for NLP++, text highlighting of matching rules for each sequential pass of rule patterns, and tree visualizations for the syntactic tree as well as the hierarchical knowledge base. It also has the ability to quickly generate rules directly from text.
== Philosophy: a glass-box approach ==
NLP++ is built on the premise that natural language understanding can be constructed '''by hand''', as human-authored knowledge, rather than being learned statistically from data. Its proponents describe the approach as a "glass box" in deliberate contrast to the "black box" of large language models (LLMs) and other machine-learning systems. The properties emphasized are that an NLP++ analyzer is:
* '''Deterministic''' — the same input always yields the same output, with no probabilistic variation;
* '''Auditable''' — every decision traces back to a specific human-written rule or knowledge-base entry;
* '''Fixable''' — an incorrect result can be corrected by editing the responsible rule, rather than by retraining;
* '''Accountable''' — the system's behavior can be explained and stood behind; and
* '''Self-contained''' — an analyzer runs on its own, requiring no trained model, GPU, or network service.
This philosophy positions NLP++ as an alternative (and in some workflows a complement) to LLMs, particularly for regulated and high-stakes domains — such as medicine, law, and finance — where explainability, repeatability, and correctability are required. The same properties make NLP++ analyzers well suited to being combined with AI coding assistants: the [[VisualText]] toolchain now documents workflows for using assistants such as Claude to help author, test, and deploy NLP++ analyzers, while keeping the resulting logic in human-readable, auditable code.


== History ==
== History ==
Line 142: Line 186:


=== Amnon Meyers ===
=== Amnon Meyers ===
Amnon Meyers worked on previous systems including Vox and the conceptual grammar ... blah blah blah
Amnon Meyers got his MS in Computer Science UC Berkeley, MS in Organic Chemistry UC Berkeley, and a BS in biology MIT. Amnon spent over a decade in aerospace NLP R&D (McDonnell Douglas & TRW) in the artificial intelligence groups developing VOX and the conceptual grammar which was developed in LISP. Amnon worked for 5 years at UC Irvine AI Lab on DARPA/Navy projects. In 1997, Amnon secured funding from friends and family to state Text Analysis International in order to create a computer programming language and IDE for creating natural language processing systems.


=== David de Hilster ===
=== David de Hilster ===
David de Hilster first developed island-driven pattern matching rules first in LISP on Xerox 1108 machines at [[Battelle Memorial Institute]] in their artificial intelligence group. He then worked in C for the commercial product called NLQuery from [[Battelle Memorial Institute]]. In the late 1980s, de Hilster developed Verbo, a natural language query system for databases in Portuguese while living in working in Rio de Janeiro Brazil.
David de Hilster got his BS in mathematics and MA in linguistics from the Ohio Statue University. De Hilster first developed island-driven pattern matching rules first in LISP on Xerox 1108 machines at [[Battelle Memorial Institute]] in their artificial intelligence group. He then worked in C for the commercial product called NLQuery from [[Battelle Memorial Institute]]. In the late 1980s, de Hilster developed Verbo, a natural language query system for databases in Portuguese while living in working in Rio de Janeiro Brazil.


=== Collaboration ===
=== Collaboration ===
In 1990, David de Hilster was hired into the Artificial Intelligence group at McDonnell Douglas in Huntington Beach California where he met Amnon and was tasked to move Amnon's Vox program to C++. The two collaborated, combining the island-driven parsing with the conceptual grammar and coming up with TexUS. Their system was used in the Message Understanding Conferences sponsored by Darp in the early 1990s and they placed third among the participants which included [[MIT]], [[SRI]], [[Carnegie Mellon]] among others.
In 1990, David de Hilster was hired into the Artificial Intelligence group at McDonnell Douglas in Huntington Beach California where he met Amnon and was tasked to move Amnon's Vox program to C++. The two collaborated, combining the island-driven parsing with the conceptual grammar and coming up with TexUS. Their system was used in the Message Understanding Conferences sponsored by Darp in the early 1990s and they placed third among the participants which included [[MIT]], [[SRI]], [[Carnegie Mellon]] among others.


In the mid 1990s, the two moved to the Aritifical Intelligence Group at Space Park at TRW where the two continued their collaboration, with de Hilster's work inspiring the creation of a new company ISearch which electronically processed resumes. In 1997, de Hilster was hired by ISearch to move their text processing system to the C language.
In the mid 1990s, the two moved to the Artificial Intelligence Group at Space Park at TRW where the two continued their collaboration, with de Hilster's work inspiring the creation of a new company ISearch which electronically processed resumes. In 1997, de Hilster was hired by ISearch to move their text processing system to the C language.


In 1998, Meyers secured funding from friends and family to start Text Analysis International which eventually lured de Hilster to join where the two created and formalized NLP++ and VisualText. The idea was to formalize a computer language that incorporated the pattern matching of de Hilster's, with the Conceptual Grammar knowledge base from Meyers, along with an [[integrated development environment]] specifically tailored to NLP++, its tree structures, and its knowledge base.
In 1998, Meyers secured funding from friends and family to start Text Analysis International which eventually lured de Hilster to join where the two created and formalized NLP++ and VisualText. The idea was to formalize a computer language that incorporated the pattern matching of de Hilster's, with the Conceptual Grammar knowledge base from Meyers, along with an [[integrated development environment]] specifically tailored to NLP++, its tree structures, and its knowledge base.
Line 158: Line 202:
== Open Source ==
== Open Source ==
[[File:VSCodeNLP.jpg|thumb|VSCode NLP++ Language Extension]]
[[File:VSCodeNLP.jpg|thumb|VSCode NLP++ Language Extension]]
In December of 2018, NLP++ and VisualText went open source. The company Text Analysis International was dissolved by and it was moved to an open source MIT licensed repository by creators [[Amnon Meyers]] and [[David de Hilster]].
In December of 2018, NLP++ and VisualText went open source. The company Text Analysis International was dissolved by and it was moved to an open-source MIT licensed repository by creators [[Amnon Meyers]] and [[David de Hilster]].


=== NLP Engine ===
=== NLP Engine ===
The NLP engine is a C++ class and executable that can called by other languages that can call c++ libraries the nlp.exe executable. It currently compiles on Linux and will be available on windows and Mac Os in the near future. The nlp.exe executable is called by the NLP++ Language Extension for VScode.
The NLP engine is a C++ class and executable that can called by other languages that can call c++ libraries or call the nlp.exe executable. It currently compiles on Linux and will be available on windows and Mac Os in the near future. The nlp.exe executable is called by the NLP++ Language Extension for VSCode.
 
==== Command Line Executable ====
The NLP Engine in the form of a command line executable called "nlp.exe" is available for all three platforms in GitHub including [https://github.com/VisualText/nlp-engine-linux Linux], [https://github.com/VisualText/nlp-engine-windows Windows], and [https://github.com/VisualText/nlp-engine-mac MacOS]. The nlp.exe file is accompanied by two ICU (International Components for Unicode) allowing the engine to deal with Unicode languages including emojis.
 
==== Python Package and Class ====
A python package and class are available for the NLP Engine.
 
The NLPPlus Python Package integrates the NLP Engine's C++ code directly into a an Python Package and is the most efficient use of the NLP Engine when using Python. The NLPPlus Python Package is a package file that can be downloaded from the VisualText github library [https://github.com/VisualText/py-package-nlpengine py-package-nlpengine] and installed using pip. It is not yet available as an official python package on pypip.org due to the backlog of approving new organizations for python packages.
 
There is also a simple NLP Engine Python Class that is available that calls the NLP Engine as an command line executable that is less efficient than the NLPPlus Python Package. This is found in the [https://github.com/VisualText/python python repository] under the VisualText github main repository.


=== VisualText ===
=== VisualText ===
Version 2 of the VisualText IDE written for Microsoft's Windows and is available as a free download from the [http://visualtext.org VisualText website]. Version 3 is also available but was never completed and is not 100 percent functional. The windows Version 2 and 3 of VisualText are no longer developed or supported although they are still in use today.
All versions of VisualText are now also open source. The early Windows-only releases (Version 2 and 3) are no longer supported, though Version 2 in particular remained heavily used. Development has since moved to a cross-platform [[VSCode]] language extension, which is now the supported IDE.
 
==== Windows Version ====
The C++ code for Version 2 and 3 of VisualText are now open source but they are currently unsupported. They both use commercial C++ libraries from CodeJock making future support in the open source world impossible.
The downloads are still available from the [https://visualtext.org VisualText website].


==== VSCode Language Extension ====
==== VSCode Language Extension ====
VisualText IDE is now ported to [[VSCode]] as a language extension which runs cross platform. This is now considered to be the current version of the IDE and will continue to be developed and enhanced. It is planned to be officially released as a Microsoft VSCode Language Extension sometime in the first quarter of 2021. It is currently available as a beta IDE in the [https://github.com/VisualText/vscode-nlp VisualText repository] on GitHub.
VisualText IDE is now ported to [[VSCode]] as a language extension which runs cross platform. This is now considered to be the current version of the IDE and will continue to be developed and enhanced. It was officially released as a Microsoft VSCode Language Extension on December 22, 2020 whose source code can be found in the [https://github.com/VisualText/vscode-nlp VSCode-NLP repository] on GitHub.


The output of the nlp.exe engine and the NLP++ Language Extension for VSCode produce a number of special files for analyzer development. Those files are:
The NLP++ Language uses human readable files for dictionaries, knowledge bases, the syntactic tree, and for the NLP++ computer language:


{| class="wikitable"
{| class="wikitable"
Line 175: Line 233:
!Description
!Description
|-
|-
|.nlp or .pat
|.nlp (.pat legacy)
|Files containing NLP++ code
|Files containing NLP++ code. The legacy files use the .pat (pattern) extension and are the only files understood by the windows versions of the VisualText IDE.
|-
|-
|.seq
|.seq
|The analyzer sequence file that store the calling order of the sequence of nlp++ files
|The analyzer sequence file that store the calling order of the sequence of nlp++ files
|-
|.tree
|Tree files that display the current syntactic tree for a give pass
|-
|-
|.txxt
|.txxt
|Rules matching highlight files containing double square brackets around matched words and phrases (new to the VSCode NLP++ Language Extension)
|Rules matching highlight files containing double square or curly brackets around matched words and phrases (new to the VSCode NLP++ Language Extension)
|-
|.kbb
|Human readable Conceptual Grammar files (kbb = knowledge base beautiful files)
|-
|-
|.kb
|.dict
|Conceptual Grammar files with the knowledge pretty-printed for inspection during develpment
|Human readable dictionary files that are looked up during the initial tokenization pass
|-
|-
|.kb (legacy)
|Legacy files dumped by the built-in function kbdumptree which is used to save and read in knowledge bases by NLP++. Except for some bootstrapping language files, these have been replaced by the more human-readable kbb files.
|}
|}
The long-term plan is to take ownership of the .nlp extension for NLP++ given it is the only computer language exclusively dedicated to natural languaage.
==== Version 3 of the NLP Engine ====
'''Version 3''' is the current line of the NLP Engine and VSCode extension (releases reached v3.7.x by July 2026). It has been characterized by its authors as "compiled, cloud-built, on npm — and AI-assisted," and introduces several major capabilities:
* '''Compiled analyzers.''' An NLP++ analyzer — and its [[Conceptual Grammar]] knowledge base — can be translated to C++ and built into native shared libraries that the engine loads at run time. From engine 3.1.44 onward, the full analyzer body runs from native shared libraries on Linux and macOS. Compilation is exposed through engine options: <code>-COMPILE</code> compiles both the analyzer and the KB to C++, <code>-COMPILEKB</code> compiles only the knowledge base (without loading the grammar or running the analyzer), and <code>-COMPILEANA</code> compiles only the analyzer. Version 3.1 added the KB-only compile path and a compiled-KB run mode.
* '''Faster execution and source-code protection.''' Because a compiled analyzer executes pre-generated, natively compiled C++ rather than interpreting rules at run time, it runs faster; it also lets developers deliver "protected" analyzers to customers without exposing the original NLP++ rules. Standalone executables can be invoked with a <code>/COMPILED</code> flag to run the compiled build, or <code>/INTERP</code> to run the interpreted version.
* '''Cloud build and npm distribution.''' Version 3 adds cloud-based building of analyzers, and the VSCode NLP++ extension is distributed through the npm ecosystem.
* '''AI-assisted development.''' The website documents a "Using Claude with NLP++" workflow that walks developers from initial setup through authoring, testing, and deploying an analyzer with the help of an AI coding assistant — while keeping the resulting logic in human-readable, auditable NLP++ code.
== The NLP++ book ==
[[File:Rule-Based NLP with NLP++ cover.jpg|thumb|right|180px|Cover of ''Rule-Based NLP with NLP++'' (BPB Online, 2026)]]
''''Rule-Based NLP with NLP++: A practical guide to rule-based text analysis with VisualText'''' is the first full-length textbook on the language, written by its creators [[David de Hilster]] and [[Amnon Meyers]] and published by [[BPB Publications|BPB Online]] in 2026 (396 pages; print ISBN 978-93-65891-98-0, eBook ISBN 978-93-65890-08-2). The book teaches the complete development lifecycle of a text analyzer — designing multi-pass analyzers in [[VisualText]], writing grammar rules and managing parse trees, and building real-world capabilities such as date-time recognition, named-entity extraction, and coreference resolution — as well as integrating NLP++ analyzers with Python, TypeScript, C++, and the HPCC Systems big-data platform. It is aimed at software engineers, computational linguists, NLP researchers, and students with basic programming experience; no prior NLP knowledge is assumed. A companion web presence for the book is maintained at [https://book.visualtext.org book.visualtext.org].
== Video tutorials ==
The official '''VisualText / NLP++ YouTube channel''' ([https://www.youtube.com/@nlpvisualtext @nlpvisualtext]) hosts a step-by-step '''"Tutorials – NLP++"''' series that teaches the language from tokenization through building complete analyzers, presented largely by [[David de Hilster]]. The [https://youtube.com/playlist?list=PLrRF6oTCn26CGezjYzwqkE2AaoTtb5wHM tutorial playlist] includes:
* [https://www.youtube.com/watch?v=Mya__3ZiBTk Tutorial 01: NLP++ Tokenization]
* [https://www.youtube.com/watch?v=i0x1435QFDs Tutorial 02: NLP++ Variables Explained]
* [https://www.youtube.com/watch?v=UoaPSf5kL94 Tutorial 03: NLP++ Recursion]
* [https://www.youtube.com/watch?v=nDvgE0jvwK8 Tutorial 04: NLP++ Special Variables]
* [https://www.youtube.com/watch?v=anoID8_ZTMw Tutorial 05: Paragraphs & Sentences]
* [https://www.youtube.com/watch?v=Su6vfRmURIE Tutorial 06: Automatic Rule & Path Generation]
* [https://www.youtube.com/watch?v=zJyJlKn_q9Y Tutorial 07: NLP++ Regions]
* [https://www.youtube.com/watch?v=YHsrd9TDKlE Tutorial 08 (Part 1): Resolving Pronouns by Building KBs on the Fly]
* [https://www.youtube.com/watch?v=KwGwslOvqWw Tutorial 08 (Part 2): Resolving Pronouns by Building KBs on the Fly]
* [https://www.youtube.com/watch?v=Nqmk1LlFcuQ Tutorial 09: NLP++ Rules Explained]
* [https://www.youtube.com/watch?v=y9wmbzSx27c Tutorial 10: Intelligent Programming with NLP++]
* [https://www.youtube.com/watch?v=wotPjDFTgu4 Tutorial 11: Dictionaries in NLP++]
* [https://www.youtube.com/watch?v=RohelF8CP2k Tutorial 12: New DICT files]
* [https://www.youtube.com/watch?v=e-JQTnXEkcg Tutorial 13: Explaining Version 2 of VisualText and the NLP Engine]
* [https://www.youtube.com/watch?v=Xt1yeIl1ySM Session on the Resume Analyzer]
* [https://www.youtube.com/watch?v=dRpGY0SPLSo Tutorial 14: Mod Files]
* [https://www.youtube.com/watch?v=XLEj1hsS4ME Tutorial 15: Resolving Ambiguity]
* [https://www.youtube.com/watch?v=xGbGYj9ixv4 NLP++ Quick Start with David de Hilster]
== Community and organizations ==
=== The NLP Foundation ===
The '''NLP Foundation''' ([https://nlp.foundation nlp.foundation]) is an organization dedicated to pursuing "a complete symbolic understanding of human language" built deterministically and by hand, rather than through probabilistic models. It frames its work as "the first serious expedition to build natural language understanding by hand," and stewards NLP++ as the common programming substrate for that effort. Its incremental strategy moves from domain-specific applications (beginning with medicine), to governed dictionaries for major languages, to general linguistic parsers, and ultimately toward symbolic understanding at scale. The Foundation emphasizes systems that are deterministic, controllable, fixable, accountable, and permanent — "language understanding that a human wrote, can read, can fix, and can stand behind" — and recruits computational linguists and contributors worldwide.
=== Natural Language Understanding Global Initiative ===
The '''Natural Language Understanding Global Initiative''' ([https://nluglob.org nluglob.org]), with the tagline "Knowledge Migration to Computers," is an educational and community platform organized around NLP++. It offers courses and workshops on the language, coordinates community NLP++ projects (such as dictionaries and sentiment analyzers), and fosters academic research and student involvement. [[David de Hilster]] is a leading figure in the initiative, which — like the NLP Foundation and VisualText — presents rule-based NLP++ as a deterministic, auditable alternative to large language models.


== External links ==
== External links ==
* [https://visualtext.org VisualText — official website]
* [https://github.com/VisualText Github open source repository]
* [https://github.com/VisualText Github open source repository]
* [http://www.visualtext.org Official website]
* [https://marketplace.visualstudio.com/items?itemName=dehilster.nlp VSCode NLP++ Language Extension]
* [http://www.textanalysis.com Legacy website]
* [https://www.youtube.com/@nlpvisualtext VisualText / NLP++ on YouTube] — incl. the [https://youtube.com/playlist?list=PLrRF6oTCn26CGezjYzwqkE2AaoTtb5wHM NLP++ tutorial series]
* [https://nlp.foundation The NLP Foundation]
* [https://nluglob.org The Natural Language Understanding Global Initiative]
* [https://book.visualtext.org ''Rule-Based NLP with NLP++'' (book)]
* [https://www.textanalysis.com Legacy website]
 
== References ==
* 2026 Book: David de Hilster and Amnon Meyers, [https://book.visualtext.org ''Rule-Based NLP with NLP++: A practical guide to rule-based text analysis with VisualText''], BPB Online (ISBN 978-93-65891-98-0)
* 2023 Paper: [https://www.abepro.org.br/biblioteca/TN_WG_404_1987_45438.pdf Emotions Detection in Social Media Posts]
* 2024 Paper: [https://ijai.iaescore.com/index.php/IJAI/article/view/24303 Enhancing the English natural language processing dictionary using NLP++]
* 2004 Paper: [https://www.computer.org/csdl/proceedings-article/icbda/2024/10607199/1Z05W 0PZF8A Scalable Analysis of English Dictionary Files on HPCC Systems Big Data Platform]
* 2024 Masters Thesis: [https://aclanthology.org/2024.bionlp-1.45.pdf by Ashton Williamson (Clemson University): Low-resource ICD Coding of Hospital Discharge Summaries]
----------------------
* 2023 YouTube Presentation: [https://www.youtube.com/watch?v=yAewDHdPaYo 2023 HPCC Systems Community Summit: Digital Human Readers Making History with NLP++ and HPCC Systems
* 2023 YouTube Presentation: [https://www.youtube.com/watch?v=RQk_PsX6l0w 2023 HPCC Systems Community Summit: Building Trustworthy and Auditable Digital Human Readers]
* 2024 YouTube Presentation: [https://www.youtube.com/watch?v=ESAizu4KvSY 2024 HPCC Systems Summit: Using NLP++ to build a Brazilian address cleaner]


[[Category:American inventions]]
[[Category:American inventions]]

Latest revision as of 22:31, 17 July 2026

NLP++
The NLP++ Logo
ParadigmsNatural Language Processing, rule-based, procedural
Designed byAmnon Meyers David de Hilster
DeveloperText Analysis International (1998–2018); open source since 2018
First appearedTemplate:Start date and age
Template:Infobox software/simple
PlatformCross Platform
OSLinux, Windows, Mac
Filename extensions.nlp, .dict, .kbb, .txxt
Websitevisualtext.org

Content on this page is licensed under the Creative Commons CC0 Waivers. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

NLP++ is a computer programming language for natural language processing created by Amnon Meyers and David de Hilster in 1998 based on a cognitive model of how humans read and understand natural language. It operates on an input text via multiple passes that elaborate a best-first parse tree. It can access and update a hierarchical knowledge base management system (KBMS) called Conceptual Grammar (CG). NLP++ and CG deploy with an Integrated Development Environment (IDE) called VisualText, which supports rapid development of text analyzers. NLP++ is the only computer language exclusively dedicated to natural language processing.

Unlike the statistical and machine-learning methods that dominate contemporary NLP, NLP++ takes a rule-based, "glass-box" approach: the linguistic and world knowledge that drives an analyzer is written by a human, in code that a human can read, audit, and fix. Because analyzers are deterministic and run on their own — with no trained model required — their behavior is repeatable and their decisions can be traced, making NLP++ suited to high-stakes domains where accountability and explainability matter.

Overview

NLP++ is a computer language dedicated to building natural language text analyzers. It allows programmers to capture and apply linguistic and world knowledge, emulating processes by which humans read and understand text. NLP++ combines bottom up, island-driven, recursive grammar, and other methods in a multi-pass architecture that operates on one parse tree. It works with a hierarchical knowledge base (KB), called Conceptual Grammar (CG), to dynamically build and use stored knowledge in analyzing text. Applications range from simple syntactic processing to full natural language understanding. VisualText is a developer's environment that exploits NLP++ and CG to rapidly elaborate text analyzers. Passes and KBs from one analyzer may be exploited to more rapidly construct and tailor new text analyzers.

NLP++

NLP++ is a computer language that takes text, breaks it down into tokens, builds up those tokens into syntactic trees, and builds and uses knowledge stored in Conceptual Grammar. The language includes functions, rules, operators, and variables specific to its internal representations of text and knowledge. NLP++ comprises general C or C++-lke programming language constructs, as well as integrally addressing rule matches and the associated knowledge base.

Variables

Variables are written with a single letter and a string name. Special variable types in NLP++ apply to specific contexts.

Variable Description Example Scope
N Specific node N("$text",2) Rules
S Suggested node S("count") Rules
X Context node and level X("concept",3) Rules
G Global variable G("People") Rules & Functions
L Local variable L("num") Rules & Functions

Regions

There are numerous regions in NLP++ files:

Region Description Position and Scope
@NODES Specifies the nodes to be matched in the @RULES region Comes before the @RULES region
@PATH Specifies a specific path in the syntax tree to match Comes before the @RULES region
@CODE Specifies a region where NLP++ code is executed outside of a @RULES region Region ends with @@CODE
@DECL Declarative area for functions Region ends with @@DECL
@POST Specifies a region of post processing for a rule or rules Comes right before the @RULES region
@PRE Specifies a region of preprocessing for a rule or rules Comes right before the @RULES region
@CHECK Specifies certain conditions on rule nodes before trying to match the rule Comes right before the @POST or @RULES region
@RULES Specifies a region for rules Region ends with @@

Rules

NLP++ has rules for pattern matching. A rule is written in the form of "@RULES _node <- a b c @@" where "<-" where a, b, and c are match and put under the new node "_node". Here is an example of a rule.

@POST
S("count") = N("$text",2);
S("concept") = makeconcept(G("Counts"),N("$text",1));
single();

@RULES
_count <-
    _xALPHA [s]  ### (1)
    _xNUM [s]    ### (2)
    @@

Built In Functions

NLP++ has built in functions for the following areas:

  • Knowledge Base Functions
  • Parse Tree Functions
  • String Functions
  • Special Functions
  • Math Functions
  • Spelling Functions
  • Formatting and I/O Functions
  • Web Functions
  • Database Functions

Analyzer Sequence

Analyzer sequence display of the full English parser written by Amnon Meyers

The analyzer sequence in NLP++ is a linear pipeline of executed NLP++ code. This code can contain rules, function declarations, or pure NLP++ code.

This facilitates bottom-up, island-driven parsing which is much more efficient that the combinatoric traversing of full grammars.

The analyzer sequence is contained in the file "analyzer.seq". Here is the analyzer sequence for a date-time analyzer:

dicttokz nil
nlp	init
nlp	KBFuncs
nlp	funcs
nlp	LinesDictTokZ
nlp	numbers
nlp	ordinals
nlp	times
nlp	zulu
nlp	timePhrases
nlp	dates
nlp	datesDay
nlp	dateTime
nlp	datePhrases
nlp	splice
nlp	kb
nlp	output

User Functions

NLP++ allows the user to create their own functions in the @@DECL area. These functions can access the syntactic tree and any part of the knowledge base, as well as files on the system.

Conceptual Grammar

The conceptual grammar is a hierarchical knowledge base that can be imported and used by NLP++ and also created by NLP++ code and pattern matching. The hierarchy contains concepts and concepts can have attributes and phrases attached to them.

VisualText

VisualText version 2 for Windows

VisualText is an IDE that is specifically built to edit, run, and debug NLP++ text analyzers. It includes a text director of texts to process, a special editor for NLP++, text highlighting of matching rules for each sequential pass of rule patterns, and tree visualizations for the syntactic tree as well as the hierarchical knowledge base. It also has the ability to quickly generate rules directly from text.

Philosophy: a glass-box approach

NLP++ is built on the premise that natural language understanding can be constructed by hand, as human-authored knowledge, rather than being learned statistically from data. Its proponents describe the approach as a "glass box" in deliberate contrast to the "black box" of large language models (LLMs) and other machine-learning systems. The properties emphasized are that an NLP++ analyzer is:

  • Deterministic — the same input always yields the same output, with no probabilistic variation;
  • Auditable — every decision traces back to a specific human-written rule or knowledge-base entry;
  • Fixable — an incorrect result can be corrected by editing the responsible rule, rather than by retraining;
  • Accountable — the system's behavior can be explained and stood behind; and
  • Self-contained — an analyzer runs on its own, requiring no trained model, GPU, or network service.

This philosophy positions NLP++ as an alternative (and in some workflows a complement) to LLMs, particularly for regulated and high-stakes domains — such as medicine, law, and finance — where explainability, repeatability, and correctability are required. The same properties make NLP++ analyzers well suited to being combined with AI coding assistants: the VisualText toolchain now documents workflows for using assistants such as Claude to help author, test, and deploy NLP++ analyzers, while keeping the resulting logic in human-readable, auditable code.

History

The roots of NLP++ come from its two creators, Amnon Meyers and David de Hilster who are computer programmers working in the area of natural language processing since the early 1980s.

Amnon Meyers

Amnon Meyers got his MS in Computer Science UC Berkeley, MS in Organic Chemistry UC Berkeley, and a BS in biology MIT. Amnon spent over a decade in aerospace NLP R&D (McDonnell Douglas & TRW) in the artificial intelligence groups developing VOX and the conceptual grammar which was developed in LISP. Amnon worked for 5 years at UC Irvine AI Lab on DARPA/Navy projects. In 1997, Amnon secured funding from friends and family to state Text Analysis International in order to create a computer programming language and IDE for creating natural language processing systems.

David de Hilster

David de Hilster got his BS in mathematics and MA in linguistics from the Ohio Statue University. De Hilster first developed island-driven pattern matching rules first in LISP on Xerox 1108 machines at Battelle Memorial Institute in their artificial intelligence group. He then worked in C for the commercial product called NLQuery from Battelle Memorial Institute. In the late 1980s, de Hilster developed Verbo, a natural language query system for databases in Portuguese while living in working in Rio de Janeiro Brazil.

Collaboration

In 1990, David de Hilster was hired into the Artificial Intelligence group at McDonnell Douglas in Huntington Beach California where he met Amnon and was tasked to move Amnon's Vox program to C++. The two collaborated, combining the island-driven parsing with the conceptual grammar and coming up with TexUS. Their system was used in the Message Understanding Conferences sponsored by Darp in the early 1990s and they placed third among the participants which included MIT, SRI, Carnegie Mellon among others.

In the mid 1990s, the two moved to the Artificial Intelligence Group at Space Park at TRW where the two continued their collaboration, with de Hilster's work inspiring the creation of a new company ISearch which electronically processed resumes. In 1997, de Hilster was hired by ISearch to move their text processing system to the C language.

In 1998, Meyers secured funding from friends and family to start Text Analysis International which eventually lured de Hilster to join where the two created and formalized NLP++ and VisualText. The idea was to formalize a computer language that incorporated the pattern matching of de Hilster's, with the Conceptual Grammar knowledge base from Meyers, along with an integrated development environment specifically tailored to NLP++, its tree structures, and its knowledge base.

For the two decades, the technology was privately owned and was licensed by private companies to process medial, social media, historical documents, and real estate text.

Open Source

VSCode NLP++ Language Extension

In December of 2018, NLP++ and VisualText went open source. The company Text Analysis International was dissolved by and it was moved to an open-source MIT licensed repository by creators Amnon Meyers and David de Hilster.

NLP Engine

The NLP engine is a C++ class and executable that can called by other languages that can call c++ libraries or call the nlp.exe executable. It currently compiles on Linux and will be available on windows and Mac Os in the near future. The nlp.exe executable is called by the NLP++ Language Extension for VSCode.

Command Line Executable

The NLP Engine in the form of a command line executable called "nlp.exe" is available for all three platforms in GitHub including Linux, Windows, and MacOS. The nlp.exe file is accompanied by two ICU (International Components for Unicode) allowing the engine to deal with Unicode languages including emojis.

Python Package and Class

A python package and class are available for the NLP Engine.

The NLPPlus Python Package integrates the NLP Engine's C++ code directly into a an Python Package and is the most efficient use of the NLP Engine when using Python. The NLPPlus Python Package is a package file that can be downloaded from the VisualText github library py-package-nlpengine and installed using pip. It is not yet available as an official python package on pypip.org due to the backlog of approving new organizations for python packages.

There is also a simple NLP Engine Python Class that is available that calls the NLP Engine as an command line executable that is less efficient than the NLPPlus Python Package. This is found in the python repository under the VisualText github main repository.

VisualText

All versions of VisualText are now also open source. The early Windows-only releases (Version 2 and 3) are no longer supported, though Version 2 in particular remained heavily used. Development has since moved to a cross-platform VSCode language extension, which is now the supported IDE.

Windows Version

The C++ code for Version 2 and 3 of VisualText are now open source but they are currently unsupported. They both use commercial C++ libraries from CodeJock making future support in the open source world impossible. The downloads are still available from the VisualText website.

VSCode Language Extension

VisualText IDE is now ported to VSCode as a language extension which runs cross platform. This is now considered to be the current version of the IDE and will continue to be developed and enhanced. It was officially released as a Microsoft VSCode Language Extension on December 22, 2020 whose source code can be found in the VSCode-NLP repository on GitHub.

The NLP++ Language uses human readable files for dictionaries, knowledge bases, the syntactic tree, and for the NLP++ computer language:

File Extension Description
.nlp (.pat legacy) Files containing NLP++ code. The legacy files use the .pat (pattern) extension and are the only files understood by the windows versions of the VisualText IDE.
.seq The analyzer sequence file that store the calling order of the sequence of nlp++ files
.tree Tree files that display the current syntactic tree for a give pass
.txxt Rules matching highlight files containing double square or curly brackets around matched words and phrases (new to the VSCode NLP++ Language Extension)
.kbb Human readable Conceptual Grammar files (kbb = knowledge base beautiful files)
.dict Human readable dictionary files that are looked up during the initial tokenization pass
.kb (legacy) Legacy files dumped by the built-in function kbdumptree which is used to save and read in knowledge bases by NLP++. Except for some bootstrapping language files, these have been replaced by the more human-readable kbb files.

The long-term plan is to take ownership of the .nlp extension for NLP++ given it is the only computer language exclusively dedicated to natural languaage.

Version 3 of the NLP Engine

Version 3 is the current line of the NLP Engine and VSCode extension (releases reached v3.7.x by July 2026). It has been characterized by its authors as "compiled, cloud-built, on npm — and AI-assisted," and introduces several major capabilities:

  • Compiled analyzers. An NLP++ analyzer — and its Conceptual Grammar knowledge base — can be translated to C++ and built into native shared libraries that the engine loads at run time. From engine 3.1.44 onward, the full analyzer body runs from native shared libraries on Linux and macOS. Compilation is exposed through engine options: -COMPILE compiles both the analyzer and the KB to C++, -COMPILEKB compiles only the knowledge base (without loading the grammar or running the analyzer), and -COMPILEANA compiles only the analyzer. Version 3.1 added the KB-only compile path and a compiled-KB run mode.
  • Faster execution and source-code protection. Because a compiled analyzer executes pre-generated, natively compiled C++ rather than interpreting rules at run time, it runs faster; it also lets developers deliver "protected" analyzers to customers without exposing the original NLP++ rules. Standalone executables can be invoked with a /COMPILED flag to run the compiled build, or /INTERP to run the interpreted version.
  • Cloud build and npm distribution. Version 3 adds cloud-based building of analyzers, and the VSCode NLP++ extension is distributed through the npm ecosystem.
  • AI-assisted development. The website documents a "Using Claude with NLP++" workflow that walks developers from initial setup through authoring, testing, and deploying an analyzer with the help of an AI coding assistant — while keeping the resulting logic in human-readable, auditable NLP++ code.

The NLP++ book

Cover of Rule-Based NLP with NLP++ (BPB Online, 2026)

'Rule-Based NLP with NLP++: A practical guide to rule-based text analysis with VisualText' is the first full-length textbook on the language, written by its creators David de Hilster and Amnon Meyers and published by BPB Online in 2026 (396 pages; print ISBN 978-93-65891-98-0, eBook ISBN 978-93-65890-08-2). The book teaches the complete development lifecycle of a text analyzer — designing multi-pass analyzers in VisualText, writing grammar rules and managing parse trees, and building real-world capabilities such as date-time recognition, named-entity extraction, and coreference resolution — as well as integrating NLP++ analyzers with Python, TypeScript, C++, and the HPCC Systems big-data platform. It is aimed at software engineers, computational linguists, NLP researchers, and students with basic programming experience; no prior NLP knowledge is assumed. A companion web presence for the book is maintained at book.visualtext.org.

Video tutorials

The official VisualText / NLP++ YouTube channel (@nlpvisualtext) hosts a step-by-step "Tutorials – NLP++" series that teaches the language from tokenization through building complete analyzers, presented largely by David de Hilster. The tutorial playlist includes:

Community and organizations

The NLP Foundation

The NLP Foundation (nlp.foundation) is an organization dedicated to pursuing "a complete symbolic understanding of human language" built deterministically and by hand, rather than through probabilistic models. It frames its work as "the first serious expedition to build natural language understanding by hand," and stewards NLP++ as the common programming substrate for that effort. Its incremental strategy moves from domain-specific applications (beginning with medicine), to governed dictionaries for major languages, to general linguistic parsers, and ultimately toward symbolic understanding at scale. The Foundation emphasizes systems that are deterministic, controllable, fixable, accountable, and permanent — "language understanding that a human wrote, can read, can fix, and can stand behind" — and recruits computational linguists and contributors worldwide.

Natural Language Understanding Global Initiative

The Natural Language Understanding Global Initiative (nluglob.org), with the tagline "Knowledge Migration to Computers," is an educational and community platform organized around NLP++. It offers courses and workshops on the language, coordinates community NLP++ projects (such as dictionaries and sentiment analyzers), and fosters academic research and student involvement. David de Hilster is a leading figure in the initiative, which — like the NLP Foundation and VisualText — presents rule-based NLP++ as a deterministic, auditable alternative to large language models.

External links

References