Category:Enguage: Difference between revisions

m
(→‎Triadic Semiotics: Corrections)
 
(5 intermediate revisions by the same user not shown)
Line 16:
 
==Background==
"Enguage" iswas adeveloped portmanteauin ofC thebetween words Language2011 and Engine2013, -and hencein itsJava unconventionalever spellingsince.
It remains experimental; however,
It was developed in C between 2011 and 2013, and in Java since then.
Itit won the [http://www.bcs-sgai.org/micomp/pastcomps.php British Computer Society's Machine Intelligence Competition] in 2016.
The name "Enguage" is a portmanteau of the words Language and Engine - hence its unconventional spelling.
 
Enguage source code repo<ref name="src">http://bitbucket.org/martinwheatman/enguage</ref> If you have '''make''' and '''git''' installed, Enguage can be downloaded, created,from andthe runsource incode three ways, thus:repo
<ref name="src">[http://bitbucket.org/martinwheatman/enguage the source code repo]</ref>,
built, and run in three ways, thus:
<pre>
$ git clone https://bitbucket.org/martinwheatman/enguage.git
$ cd enguage
$ make jar
$ export PATH=$PATH:./sbin # the full test suite calls scripts in ./sbin
$ java -jar lib/enguage.jar -t
$ java -jar lib/enguage.jar -T hello
Line 35 ⟶ 38:
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 voicespeech, and some of the written specifications usedemostrate this style.
 
==Linguistic Influence==
Line 46 ⟶ 49:
[https://en.wikipedia.org/wiki/Charles_Sanders_Peirce Charles Sanders Peirce] devised the philosophy of Pragmatism, that things are defined by their effect, which is summarised in his [https://en.wikipedia.org/wiki/Pragmatic_maxim Pragmatic Maxim]
===Dyadic Semiology===
[https://en.wikipedia.org/wiki/Ferdinand_de_Saussure Ferdinand de Saussure] created the first synchronic model of language - how a language works at any one point in time.
[https://en.wikipedia.org/wiki/Course_in_General_Linguistics#Syntagmatic_and_paradigmatic_relations 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,
Line 66 ⟶ 71:
[[File:Semiotic Triangle.png|thumb|right|alt=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 wrote The Meaning of Meaning <ref name="MoM">[http://courses.media.mit.edu/2004spring/mas966/Ogden%20Richards%201923.pdf The Meaning of Meaning]</ref> in 1923,
which draws on Peirce's Semiotics and illustrates this in the functioning of speech asin the aSemiotic triangleTriangle.
The Symbol, bottom left corner, implies the referent Object, bottom right, through athe dotted, baseline; but, that connection is only ever made through the processtop apex, ofby thinking.
 
TheFurther, the Symbol has a 1:1 relationship with the thoughtsinterpretation, 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.
 
Line 88 ⟶ 93:
This became codified in John Searle's Speech Act theory.
===Implicature===
[https://en.wikipedia.org/wiki/Paul_Grice H. Paul Grice's] William James' Lecture, at Harvard in 1957, tointroduced introducehis ideas on meaning outside of the traditional linguistics.
HeThis introducedincludes the idea that meaning, isin whata wider sense, is implicated by an utteranceutterances.
 
==Algorithm==
Enguage models utterances as symbols and replicates the idea of function illustrated in the Semiotic Triangle. As a symbol processing system, Enguage is grounded in symbols. Therefore, referent objects, and thoughts and references, are also symbols. Thoughts and references may also serve as symbols in further triads, like functions in a programming language may call other functions, and so there is a process of [https://en.wikipedia.org/wiki/Semiosis semiosis] occurring.
An utterance can be represented as a numeric value. In a simplified representation, a string may be represented numerically, thus: "a"=1, "b"=2, ... "z"=26, "aa"=27, and so on. A full utterance is merely an array of such values, to an arbitrary base, so ["i", "need", "a", "coffee"] is simply a large integer value, in much the same way as [1,2,3,4] might represent 1,234 in base 10.
 
An utteranceSymbols can be represented as a numeric valuevalues. In software, this is typically as consecutive numbers, such as false=0 and true=1. In a simplified representation, a string may be represented numerically, thus: "a"=1, "b"=2, ... "z"=26, "aa"=27, and so on. A full utterance is merely an array of such values, to an arbitrary base, so ["i", "need", "a", "coffee"] is simply a large integer value, in much the same way as [1,2,3,4] might represent 1,234 in base 10. Enguage is not concerned with deconstructing symbols nor with defining what a symbol, ostensibly, means.
Enguage swaps two symbols: the user's '''utterance''', "''hello''", with one of the '''replies''' given in the interpretation, "''hello to you too''".
It does this either directly, which can be defined by the utterance ''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.
 
Enguage swaps two symbols: the user's '''utterance''', "''hello''", with one of the '''replies''' given in the interpretation, "''hello to you too''", but this is not a dyadic relationship.
It can be defined, directly, by the utterance ''On "hello", reply "hello to you too".''; but this instruction can be augmented by further implications, e.g. This implies ... .
There is always the intermediate thought: the symbol always refers to (or ''symbolises'' in the above diagram) the instructions on how to reply.
 
As a simple arithmetic example, "what is two plus two" may imply "4, 2 + 2 is 4", but can only through the thought "{2 + 2}". This unnamed function is known as a [https://en.wikipedia.org/wiki/Lambda_calculus lambda]. This is why linguistic is more complex than arithmetic, and perhaps why mathematics does not underpin language. Further utterance, the lambda, requires the maintenance, and use, of a replied answer (e.g. 4) and a socially defined format within which to place it (e.g. "ANSWER, UTTERANCE is ANSWER") and the status, or felicitous outcome, of that thought to direct the processing of the lambda.
 
===Ambiguity===
Each utterance has one or more interpretations <ref name="disamb">[http://dx.doi.org/10.1007/978-3-319-42102-5_16 A Pragmatic Approach to Disambiguation, ICISO, 2016]</ref>, 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.''"
Line 102 ⟶ 113:
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''.
 
===Hooks===
The Turing complete quality of a function is that it is represented as a list of instructions.
As well as the 'on "..."' and 'reply "..."' imperativeimperatives, 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.
 
===Turing Complete Lambda===
The Turing complete quality of a function is that it is represented as a list of instructions, a [https://en.wikipedia.org/wiki/Lambda_calculus lambda].
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, for example, '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,
So as not to create ''reserved words'', these can be configured as required by the language.
This supplies the idea of conditional processing and recalling (recursion) is used to create loops,
see the [https://rosettacode.org/wiki/FizzBuzz#Enguage 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.
==Concepts==
A concept is supported by a repertoire of utterances.
49

edits