Difference between revisions of "Universal Prokee Language"

From prokee
Jump to navigation Jump to search
(The Chinese Influence)
Line 1: Line 1:
 
The '''Universal Prokee Language''' (UPL) is a programming language based on natural languages and semantic nets.
 
The '''Universal Prokee Language''' (UPL) is a programming language based on natural languages and semantic nets.
  
== The Chinese Influence ==
+
== Programming in Chinese? ==
The main influence for UPL comes from classic Chinese grammar. The Chinese language works different compared to western languages. In written Chinese, Words (which f.e. represents categories of objects of the real wold) are represented by symbols. In classic Chinese every symbol represents a word and every word is written by a single symbol. This symbols can be combined to sentences by using symbols which can be seen like operators in a math formula. Chinese grammar is based on word order and rules of logic. And therefore Chinese is much more like programming languages. F.e. when writing code in BASIC, or mostly any other language, the syntax defines a fix order of words within valid sentences and the interpretation of operators follows some easy rules of logic. F.e. the '+' operator stands for an arithmetic operation and expects two operands in infix notation.
+
Some inspiration for UPL comes indeed from the Chinese language.
 +
 
 +
In most languages, written words are representations of their phonetic sequence. The atomic symbols of the written language therefore represent the sounds, which form the words of the language. The amount of different sounds of a human language is very small, so a small alphabet is sufficient to be able to write every word of such a language. The difference to Chinese is, that the defining element of a word of western (or non Chinese) languages, is how it sounds, its phonetic sequence. By knowing all spelling rules one can write and read German or English words without understanding them.
 +
 
 +
In Chinese the meanings of words are represented by Symbols (Chinese characters) directly, without being required to know a how word is spoken. At the early beginnings of the Chinese language every symbol represented a word and every word was written by a single symbol. And also today most Chinese words consist of only very view (one or two, rarely 4 ore more) characters. The consequence of this is, that a huge "alphabet" is required, and avoiding the introduction of unnecessary symbols is essential.
 +
 
 +
In German f.e. we have inflection of nouns and verbs. German words come in different forms regarding to cases (nominative, accusative, genitive and dative), genders (masculine, feminine and neuter), number (singular or plural), conjugation classes, persons (first second and third), moods (infinitive, indicative, imperative and subjunctive), voices (active and passive), tenses and so on. All those different forms are essential for German.
 +
 
 +
In Chinese, we have only one character representing a word (or a view characters for compound words). So the information carried by all the different forms of words as we have them in German, have to be encoded in a different way. This is done by replacing inflection with word order.
 +
 
 +
When we look at computer languages, we normally do not have infection of keywords, but we do have a fixed word order to build valid sentences. Therefore, when we want to develop a programming language, which is more like human languages, Chinese would be a promising language to start with.
  
 
== Semantic Nets ==
 
== Semantic Nets ==

Revision as of 22:49, 3 May 2019

The Universal Prokee Language (UPL) is a programming language based on natural languages and semantic nets.

Programming in Chinese?

Some inspiration for UPL comes indeed from the Chinese language.

In most languages, written words are representations of their phonetic sequence. The atomic symbols of the written language therefore represent the sounds, which form the words of the language. The amount of different sounds of a human language is very small, so a small alphabet is sufficient to be able to write every word of such a language. The difference to Chinese is, that the defining element of a word of western (or non Chinese) languages, is how it sounds, its phonetic sequence. By knowing all spelling rules one can write and read German or English words without understanding them.

In Chinese the meanings of words are represented by Symbols (Chinese characters) directly, without being required to know a how word is spoken. At the early beginnings of the Chinese language every symbol represented a word and every word was written by a single symbol. And also today most Chinese words consist of only very view (one or two, rarely 4 ore more) characters. The consequence of this is, that a huge "alphabet" is required, and avoiding the introduction of unnecessary symbols is essential.

In German f.e. we have inflection of nouns and verbs. German words come in different forms regarding to cases (nominative, accusative, genitive and dative), genders (masculine, feminine and neuter), number (singular or plural), conjugation classes, persons (first second and third), moods (infinitive, indicative, imperative and subjunctive), voices (active and passive), tenses and so on. All those different forms are essential for German.

In Chinese, we have only one character representing a word (or a view characters for compound words). So the information carried by all the different forms of words as we have them in German, have to be encoded in a different way. This is done by replacing inflection with word order.

When we look at computer languages, we normally do not have infection of keywords, but we do have a fixed word order to build valid sentences. Therefore, when we want to develop a programming language, which is more like human languages, Chinese would be a promising language to start with.

Semantic Nets

A semantic net is a representation of words (or objects, or classes of objects) and the relationships between those words.

Has-A Relationship

The has-a relationship between two objects (or words) describes ownership. F.e. a car has-a steering wheel.

The has-a relationship is the default relationship between consecutive words. The sentence "A car has a steering wheel." translates into UPL as shown below.

Car SteeringWheel

If we refer to the steering wheel, the statement above may also be interpreted as "the steering wheel of the car" or "a steering wheel of a car". See #Paths and Queries on how to refer explicitly to a specific item.

Is-A Relationship

The is-a relationship between two objects (or words) describes inheritance. F.e. a car is-a vehicle.

The default is-a operator is the colon ':'. The sentence "A car is a vehicle." translates into UPL a shown below.

Car:Vehicle

Multiple inheritance can be established by stating all superclasses concatenated by a comma ','.

F.e.

C:Letter,ProgrammingLanguage,RomanNumeral

would be interpreted as: 'C' is a letter, a programming language and a roman numeral.

Other Relationships

Other relationships can be established by a concatenation of has-a and is-a relationships.

Paths and Queries