Natural Language Programming - Interpretation

Interpretation

The smallest unit of statement in NLP is a sentence. Each sentence is stated in terms of concepts from the underlying ontology, attributes in that ontology and named objects in capital letters. In an NLP text every sentence unambiguously compiles into a procedure call in the underlying high level programming language such as MATLAB, Octave, SciLab, Python, etc.

Symbolic languages such as Mathematica are capable of interpreted processing of queries by sentences. This can allow interactive requests such as that implemented in Wolfram Alpha (see external links). The difference between these and NLP is that the latter builds up a single program or a library of routines that are programmed through natural language sentences using an ontology that defines the available data structures in a high level programming language.

An example text from an English language NLP program (in sEnglish) is as follows:

If U_ is 'smc01-control', then do the following. Define surface weights Alpha as "". Initialise matrix Phi as a 'unit matrix'. Define J as the 'inertia matrix' of Spc01. Compute matrix J2 as the inverse of J . Compute position velocity error Ve and angular velocity error Oe from dynamical state X, guidance reference Xnow . Define the joint sliding surface G2 from the position velocity error Ve and angular velocity error Oe using the surface weights Alpha. Compute the smoothed sign function SG2 from the joint sliding surface G2 with sign threshold 0.01. Compute special dynamical force F from dynamical state X and surface weights Alpha. Compute control torque T and control force U from matrix J2, surface weights Alpha, special dynamical force F, smoothed sign function SG2. Finish conditional actions.

that defines a feedback control scheme using a sliding mode control method. This entry describes NLP in its general form, without being specific about the underlying high level programming language.

The following are discussed:

Read more about this topic:  Natural Language Programming