Category:Enguage

From Rosetta Code
Language
Enguage
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using Enguage.

Enguage is a speech understanding algorithm which supports the idea that speech is Turing complete, so respectfully requests a place on Rosetta Code. It is informed by linguistic theory, in particular Pragmatism, Ordinary Language Philophy and Speech Act theory. These were developed in the latter half of the 20th Century: at the same time as the rise of traditional context-free programming languages.

While the examples here are given in English, it can be applied to any natural language. While untested, it should work with Unicode characters so it could be used to implement John Searle 's Chinese Room. It is therefore the interpreter, and not the language, to which Enguage refers. It can be used to process data, but it is not efficient in doing this.

It is largely unsuitable for interpreting writing, as this is not a discourse.

Background

"Enguage" is a portmanteau of the words Language and Engine - hence its unconventional spelling. It is being actively developed and has been since 2011. It won the British Computer Society's Machine Intelligence Competition in 2016.

Enguage source code repo If you have make and git installed, Enguage can be downloaded, created, and run in three ways, thus:

    $ git clone https://bitbucket.org/martinwheatman/enguage.git
    $ cd enguage
    $ make jar
    $ export PATH=$PATH:./sbin
    $ java -jar lib/enguage.jar -t
    $ java -jar lib/enguage.jar -T hello
    $ java -jar lib/enguage.jar

These three examples of running the interpreter are: -t, the full unit test suite; -T the unit test for a given concept; and, the interactive shell.

The interpretation of language is defined in written specifications, under the etc/ directory. Repertoires, each supporting a concept are under etc/rpts and unit tests are under etc/test. An 'active' dictionary, of entries with an embedded unit test, is under etc/dict. The interpretation of language can also be supplied by utterance, i.e. by voice, and some of the written specifications use this style.

Linguistic Influence

Enguage draws inspiration from linguistic theory and is an attempt to implement Ordinary Language Philosophy. This is rejection of the Structuralist approach to meaning in language; that there is not an underlying mathematical logic to the science of meaning. The schism in the meaning of meaning originated in the dichotomy between dyadic and triadic sign models. Semiotics is the study of signs, and a sign is simply the atomic element in meaning. This is a brief synopsis.

Pragmatism

Charles Sanders Peirce also devises the philosophy of Pragmatism, that things are defined by their effect, which is summarised in his Pragmatic Maxim

Dyadic Semiology

Ferdinand de Saussure created the first synchronic model of language - how a language works at any one point in time. He described a dyadic sign at the heart of this Semiology. Here, a signifier, a written or spoken artefact, signifies a mental image. There is an arbitrary link between what it said and its signified mental image.

Triadic Semiotics

Around the same time, but independently, Charles Sanders Peirce devised a triadic model, which is composed of: a sign vehicle, or Representamen'; a referent Object to which the sign vehicle refers; and, the reasoning within the mind to make the connection between the two, Interpretant'. Interpretant is always present, and thus this is a model of subjectivity.

Peirce describes the object being referenced in one of three ways, and as symbolic information, language works at the third level. So, at the first level the color red may represent danger, and at the second level there are many instances of this, such on a hot tap or stop switch on a machine, but it is at the third level in which we propagate this as an idea by saying, "red means danger".

The Meaning of Meaning

An equilateral triangle is labelled with Symbol to the left, Object to the right, and Thought or Reference to the top apex. The base line is dotted to signify the implied relationship between the Symbol and Object is only achieved through the Thought or Reference of the interpreter.
The Semiotic Triangle of Reference, figure taken from page 11 of The Meaning of Meaning.

British linguists C. K. Ogden and I. A. Richards, published The Meaning of Meaning [1] in 1923, draws on Peirce's Semiotics, illustrating the functioning of speech as a triangle, whereby a Symbol has an implies the referent Object, but only through the process of thinking.

The Symbol has a 1:1 relationship with the thoughts, but those Thoughts or Reference may refer to one or more objects. This is an illustrates the difference between an arithmetical function, which has one return value, and that of a programming language which, due to its conditional processing quality, may have one of several replies.

Speech Act Theory

J. L. Austin used his William James' Lecture, at Harvard in 1955, to critique the traditional analysis of language towards truth statements. He introduce the idea of performative statments which include: what is uttered, locution; what is meant by this, illocution: and, the outcome of this speech act, perlocution. The successful outcome, the felicity, is dependent upon the circumstances, and by whom, the speech act is uttered. This work was published posthumously in [2] The emphasis on outcome reflects Peirce's idea of effect in Pragmaticism. This became codified in John Searle's Speech Act theory.

Implicature

H. Paul Grice's William James' Lecture, at Harvard in 1957, to introduce ideas on meaning outside of the traditional. He introduced the idea that meaning is what is implicated by an utterance.

Algorithm

All Enguage does is to swap the user's utterance, "hello", with one of the interpretation's replies, "hello to you too". It does this either directly, On "hello", reply "hello to you too"., or by issuing (thinking?) further utterances and maintaining, and using, a replied answer and the status, or felicitous outcome, of that thought.

Each utterance has one or more interpretations [3], which is the equivalent of a function in a traditional programming language. Each function can be specified in a .txt file, or can be created by utterance, e.g. "to the phrase hello reply hello to you too." A group of utterances, a repertoire, equivalent to an API in traditional languages supports an idea, or concept. For example, a simple repertoire might be: i need a coffee, i do not need a coffee, do i need a coffee and what do i need.

The Turing complete quality of a function is that it is represented as a list of instructions. These instructions can form loops, and can be conditionally operated, and are implemented by the implemented language, not in source code (i.e. within the interpreter). The felicitous nature of a thought can be used by prefixing a subsequent thought with 'if so, ...' if the outcome is positive, and 'if not, ...' if it negative. This supplies the idea of conditional processing and recalling (recursion) is used to create loops, see the FizzBuzz example. Thus, interaction with Enguage is always given as a Turing complete discourse: utterance to reply.

Hooks

As well as the 'reply "..."' imperative, Enguage also has several other such 'hooks' to allow other operations available to the software to be called, such as perform "..." to access the Java classes, and run "..." to run an external command. That Enguage passes off processing to traditional software is regarded as little different to machine code operating an ALU to provide arithmetic operations.

References

Pages in category "Enguage"

The following 2 pages are in this category, out of 2 total.