类自然语言程序设计分享 http://blog.sciencenet.cn/u/yinpu 博主开发开蒙语言。具备自然语言主要特征:语言表达知识;无限词汇量

博文

Brief of Quasi_Natural Language

已有 1736 次阅读 2019-11-3 11:39 |个人分类:类自然语言程序设计|系统分类:论文交流

Brief of Quasi_Natural Language

Expressing the most complicated concepts with the simplest sentences or performing the most tasks with the least words is always the aspiration of programming languages. To this purpose, natural languages are undoubtedly the best. The word entironment in natural language imply unlimited connotation. The instruction make the economic plan involve tremendous work. How about program this way?

The features of natural language

The most significant differences between natural language and traditional language appear in two aspects: the first is infotainment; the second is the openness.

Infotainment : Natural languages imply knowledge while traditional languages are just procedure description tools which contain almost no knowledge. As noun sun implied red color and hot. On the contrary, An integer in traditional languages represent nothing to the compiler. The interpretation of data is totally left to programmer.

Openness: Natural languages are open languages, with unlimited vocabulary and unlimited content in every word. The traditional languages are closed languages made up of limited commands or key words. Natural languages may expand both extensively, and intensively. Means the vocabulary and the content of words of natural languages may expand without rebuild the language processor. But traditional languages, the predefined statements or commands are is immutable both in format and connotation after the language processors are built.

Knowledge representation in Quasi_Natural Language

The elements of Quasi_Natural Language are unlimited words defined in dictionaries, which are independent of language processor.

The Structure of Word

A word consists of a word name and properties, as in Fig 1. At least one property Part of Speech is necessary, which determine the syntactic part of word.

 

 fig1.png

Fig 1

Knowledge representation in noun


The noun define the data structure of an object (class and instance object are indifferent in Quasi_Natural Language). As noun sound define all data required for processable sound object in Windows in Fig 2. Since the language is at first developed for Chinese, some data appear in Chinese chatacters.


fig2b.png 

Fig 2

Every properties in Fig 2 must be defined by other noun until reaching basic data type without further structure. As wavHeader defined in Fig 3.

 fig3b.png

Fig 3

Similarly, property chunkID is defined in Fig 4.

 fig4b.png

Fig 4

Word chunkID is a basic data type without more property to be defined further. The 2 lines in the table appeare in Chinese are property Part of Speech and property data type.

Other properties in Fig 2 and Fig 3 are defined likely. And form a hierarchy structure as in Fig 5.

fig5b.png 

Fig 5

Knowledge representation in verb

All operations are defined in verbs. Verb defines the operated objects, produced object and information for the executable code to perform the verb. As verb record is defined in Fig 6.

fig6b.png 

Fig 6

Another class of verb is written in Quasi_Natural Language. Its defined similarly.

Inheritance

All the nouns may be Inherited by other nouns. As in Fig 7, noun PureTone inherit all properties and suitable verbs of noun wav by defining a property WordClass and set its value to wav.

fig7b.png 

Fig 7

The properties  defined in PureTone overlay the homonymic properties in noun wav. If there is no homonymic property in wav, new property is added to PureTone at running time.

In this case, property FileSpecification and property wavFormat in PureTone overlay homonymic properties defined in wav(although its empty in this case) by nouns PureToneSpecification. And StandardFormat, which define some detailed information. As PureToneSpecification defined in Fig 8.

fig8b.png 

Fig 8

Instance of Quasi_Natural Language Code

With knowledge in dictionary we perform tasks in simple code instead of chunk of code required in traditional languages. As the code in Fig 9 record a voice and save to a file specified in noun PureToneSpecification.

fig9b.png 

Fig 9

Sentence ThereIs PureTone declare an object PureTone.

Sentence record PureTone acts verb record upon object PureTone to perform operation record.

Conclusion

Complicated data structure may be abstracted into simple noun. Chunk of code may be abstracted into simple verb. So brief sentences may perform heavy tasks.

Remarks

A prototype of Quasi_Natural LanguageKaimeng Language is implement by the author. The primary ideas of Quasi_Natural Language are all realized in Kaimeng.

Some ideas as build new knowledge upon existing knowledge are implemented in Chinese, not appear in this document.

 

 

Author: Yinpu

E-mail: yinpu@whu.edu.cn





https://blog.sciencenet.cn/blog-271176-1204645.html

上一篇:Think As Human
下一篇:类自然语言简介
收藏 IP: 171.43.162.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 00:44

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部