The NLP engine is the engine that runs text analyzers writtein in NLP++. It can be called in two different ways:
- Calling the nlp.exe command line executable (this is what the VSCode NLP++ Language Extension does)
- Calling from within C++ or another language that can call c++ functions
You can get help on nlp.exe:
[command arg: --help]
usage: nlp [--version] [--help]
[-INTERP][-COMPILED] INTERP is the default
[-ANA analyzer] name or path to NLP++ analyzer folder
[-IN infile] input text file path
[-OUT outdir] output directory
[-WORK workdir] working directory
[-DEV][-SILENT] -DEV generates logs, -SILENT (default) does not
[infile [outfile]] when no /IN or -OUT specified
Directories in the nlp.exe files:
data nlp engine bootstrap grammar
analyzers default location for nlp++ analyzer folders
visualtext common files for the VisualText IDE
Switch | Function |
---|---|
-INTERP / -COMPILED | Runs NLP++ code interpreted or compiled |
-ANA | name of the analyzer or path to the analyzer folder |
-IN | Input file |
-OUT | Output directory |
-WORK | Working director where the library and executable files are |
-DEV / -SILENT | -DEV generates logs, -SILENT (default) does not |
[infile [outfile]] | when no -IN or -OUT specified |
There is a test directory in the repository that builds a test.exe that calls analyzers using c++ code.
The test directory contains a call to the nlp engine using buffers.
In order to compile the NLP Engine on linux, you will need to install the following packages:
- git clone https://github.com/VisualText/nlp-engine.git
- cd nlp-engine
- mkdir build
- cd build
- cmake ../
- make
Too be done