NLP++ has a set of special functions. These have been listed here in table form for easy reference. For examples of these functions, refer to the individual function pages included in the Special Functions section.
The return types include: STR (string), INT (integer), and BOOL (Boolean). Boolean type is currently implemented by integer 1 (or non-zero) for true and 0 for false. NONE indicates nothing is returned.
FUNCTION NAME |
RETURNS |
DESCRIPTION |
batchstart() |
BOOL(1,0) |
Check if start of a batch analysis. True if current file is first in a batch run. |
debug() |
BOOL(1,0) |
No op. Convenient breakpoint for debugging from C++ compiler. |
exitpass() |
NONE |
Exit from the current pass file immediately, without performing rule matching (if any). |
exittopopup(message_str, |
BOOL(1,0) |
Exit from current pass, invoking a popup if within VisualText. |
fail() |
NONE |
In CHECK Region, abort the rule that has just matched. Noop elsewhere. See succeed(). |
findana |
STR |
See if named project is already resident in memory. (New in 1.6) |
getpopupdata() |
STR |
Get the data typed in by a call to exittopopup(). |
hitconf(hits_num, total_num, fudge_num) |
INT (0 to 100) |
Calculate the keyword density. Fudge factor is typically 3 to 20. |
interactive() |
BOOL(1,0) |
True if analyzer is being run in an interactive environment, e.g., inside VisualText. |
mkdir(dir_str) |
BOOL(1,0) |
Create a directory. Operating system-dependent. |
permuten(tot_num) |
INT ARR |
Permute integers 0 to (tot_num - 1) such that array element k will never be equal to k. |
succeed() |
NONE |
In CHECK Region and CODE Region, succeed without executing further code. See fail(). |
system(str) |
BOOL(1,0) |
Execute str as operating system command. |
today() |
STR |
Format the current date and time as a string. |
|
|
|