What is Natural Language Programming?

When Natural Language Programming (also abbreviated as NLP) is used for the development of software, the computer programme consists of mostly English-language texts (structured by sections).

The sentences that make up these texts are closely based on human language. In order for them to be processed by the computer, the so-called NLP documents are written in deeper programming languages, such as 'language'. Python translated.

Natural Language Programming has a number of analogies to the seminal Natural Language Processing (processing of spoken language); both fields deal with the control of computers through human language. However, Natural Language Programming only plays a role for experts, because the syntax of the different programming languages must first be learned. The latter field is also of interest to end users, since only the ability to speak is required of the user.

What is the syntax of NLP?

With a few exceptions, programming languages - developed for Natural Language Programming - are aimed at according to the syntax of the English language. They often differ from each other only in nuances. Therefore, programmes can be read out to any person and executed by a computer at the same time.

Apart from the syntax, it is as a developer, it is important to be aware of the ontologywhich underlies each of these languages. The resulting generic system makes it possible to write computer programs based on NLP. Sentences within an ontology are characterised by the fact that they always either establish a context, perform an action or answer a question.

What are examples of Natural Language Programming?

  • Transcript is one of the best-known programming languages in Natural Language Programming. LiveCode, the integrated development environment based on it, is used for learning purposes in a third of Scottish schools.
  • Inform 7 is an object-oriented language intended for the development of text adventures. In this computer game genre, the player navigates through the game using text input. Thanks to different language versions, it is also possible to "programme" in German.
  • AppleScript, as part of Apple's macOS operating system, shows how widespread NLP was and still is. It can be used, for example, to automate repetitive tasks, but has not been updated for some time.
  • HyperTalk is also developed by Apple and is equipped with the possibilities of procedural programming (i.e. for/while/until, if/then/else, as well as function handlers are available).
  • SenseTalk is another representative of the high level scripting languages and can be written both object-oriented and procedural.
  • Various frameworks allow well-known languages such as Python to be used for Natural Language Programming. Quepy makes database queries out of Python code, for example.