Difference between revisions of "NLP++"
|Line 18:||Line 18:|
== Overview ==
== 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
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 with a hierarchical knowledge base called Conceptual Grammar dynamically build and use stored knowledge in text. from simple syntactic processing to full natural language understanding. NLP++ analyzersbe .
=== 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
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 language includes functions, rules, variables specific to its internal representations of text and knowledge.
==== Variables ====
==== Variables ====
Variables are written with a single letter and a string name.
Variables are written with a single letter and a string name. variable types in NLP++ specific contexts.
Revision as of 21:07, 22 December 2020
The NLP++ Logo
|Paradigms||Natural Language Processing|
|Designed by||Amnon Meyers David de Hilster|
|Developer||Text Analysis International|
|First appeared||Template:Start date and age|
|Filename extensions||.nlp, .pat, .seq, .txxt, .kb|
NLP++ is a computer programming language for natural language processing created by Amnon Meyers and David de Hilster in 1998. 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 that is exclusively dedicated to natural language processing.
- 1 Overview
- 2 History
- 3 Open Source
- 4 External links
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++ 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 are written with a single letter and a string name. Special variable types in NLP++ apply to specific contexts.
|X||Context node and level||X("concept",3)||Rules|
|G||Global variable||G("People")||Rules & Functions|
|L||Local variable||L("num")||Rules & Functions|
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 post processing for a rule or rules||Comes right before the @RULES region|
|@CHECK||Specifies certain conditions on rule nodes before trying to make the rule||Comes right before the @POST or @RULES region|
|@RULES||Specifies a region for rules||Region ends with @@|
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:
- Database Functions
- Formatting and I/O Functions
- Knowledge Base Functions
- Math Functions
- Parse Tree Functions
- Special Functions
- Spelling Functions
- String Functions
- Web 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.
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 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.
Amnon Meyers worked on previous systems including Vox and the conceptual grammar ... blah blah blah
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.
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 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.
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.
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.
All versions of VisualText are now also open source. Version 2 and 3 are no longer supported but heavily used (almost exclusively Version 2). The new VSCode Extension version will be the supported version of the IDE and runs on windows, macs, and Linux.
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. Version 3 is also available but was never completed and is not 100 percent functional.
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 VisualText 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:
|.nlp or .pat||Files containing NLP++ code. The original files are .pat files 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|
|.txxt||Rules matching highlight files containing double square or curly brackets around matched words and phrases (new to the VSCode NLP++ Language Extension)|
|.kb||Files dumped by the built-in function kbdumptree which is used to save and read in knowledge bases by NLP++|
|.kbb||Conceptual Grammar files with the knowledge pretty-printed for inspection during development|
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.