西西軟件園多重安全檢測下載網(wǎng)站、值得信賴的軟件下載站!
軟件
軟件
文章
搜索

首頁編程開發(fā)其它知識 → Loglan邏輯綜合可發(fā)音語言

Loglan邏輯綜合可發(fā)音語言

相關(guān)軟件相關(guān)文章發(fā)表評論 來源:本站整理時(shí)間:2010/8/23 9:59:54字體大。A-A+

作者:佚名點(diǎn)擊:48次評論:0次標(biāo)簽: 邏輯 驗(yàn)證 語法

  • 類型:其它游戲大。677KB語言:英文 評分:5.0
  • 標(biāo)簽:
立即下載

Problem
問題
Loglan is a synthetic speakable language designed to test some of the fundamental problems of linguistics, such as the Sapir Whorf hypothesis. It is syntactically unambiguous, culturally neutral and metaphysically parsimonious. What follows is a gross over-simplification of an already very small grammar of some 200 rules.
Loglan是一種綜合型可發(fā)音的語言,設(shè)計(jì)它是用來驗(yàn)證語言學(xué)上的一些原則性問題,比如薩皮爾—沃爾夫假說。它的句法精確明了,在文化上趨于中立,它的哲學(xué)是能省則省。該語言的語法集已經(jīng)被過份的簡化——只有200條語法規(guī)則。

Loglan sentences consist of a series of words and names, separated by spaces, and are terminated by a period (.). Loglan words all end with a vowel; names, which are derived extra-linguistically, end with a consonant. Loglan words are divided into two classes--little words which specify the structure of a sentence, and predicates which have the form CCVCV or CVCCV where C represents a consonant and V represents a vowel (see examples later).
Loglan的語句由一系列的單詞和名稱組成,中間由空格隔開,并由一個(gè)點(diǎn)號(.)表示結(jié)束。Loglan的單詞均以元音結(jié)束;名稱來自于該語言之外,由輔音結(jié)束。Loglan的單詞分為兩類——小單詞和謂詞。小單詞指定了句子的結(jié)構(gòu);謂詞的形式為“CCVCV”或“CVCCV”,其中C代表一個(gè)輔音,V代表一個(gè)元音。(見下面的例子)

The subset of Loglan that we are considering uses the following grammar:
我們考慮使用Loglan語言的一個(gè)子集,具有以下語法定義:

A → a | e | i | o | u
MOD → ga | ge | gi | go | gu
BA → ba | be | bi | bo | bu
DA → da | de | di | do | du
LA → la | le | li | lo | lu
NAM → {all names}
PREDA → {all predicates}
<sentence> → <statement> | <predclaim>
<predclaim> → <predname> BA <preds> | DA <preds>
<preds> → <predstring> | <preds> A <predstring>
<predname> → LA <predstring> | NAM
<predstring> → PREDA | <predstring> PREDA
<statement> → <predname> <verbpred> <predname> | <predname> <verbpred>
<verbpred> → MOD <predstring>

 Write a program that will read a succession of strings and determine whether or not they are correctly formed Loglan sentences.
寫一個(gè)程序,讀入一組字符串并確定它們是不是正確的Loglan語句。

Input and Output
輸入與輸出
Each Loglan sentence will start on a new line and will be terminated by a period (.). The sentence may occupy more than one line and words may be separated by more than one whitespace character. The input will be terminated by a line containing a single `#'. You can assume that all words will be correctly formed.
每個(gè)Loglan語句均從新的一行開始,并以句點(diǎn)(.)結(jié)束。一條語句可能占用多行,且單詞之間可能會多于一個(gè)空格。所有的輸入由一個(gè)獨(dú)占一行的#號表示結(jié)束。你可以認(rèn)為所有單詞的格式都是正確的。

Output will consist of one line for each sentence containing either 'Good' or 'Bad!'.
對于每一個(gè)輸入的語句,應(yīng)輸出"Good"或"Bad!"。

Sample input
輸入示例
la mutce bunbo mrenu bi ditca.
la fumna bi le mrenu.
djan ga vedma le negro ketpi.
#

Sample output
輸出示例
Good
Bad!
Good

    相關(guān)評論

    閱讀本文后您有什么感想? 已有人給出評價(jià)!

    • 8 喜歡喜歡
    • 3 頂
    • 1 難過難過
    • 5 囧
    • 3 圍觀圍觀
    • 2 無聊無聊

    熱門評論

    最新評論

    發(fā)表評論 查看所有評論(0)

    昵稱:
    表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
    字?jǐn)?shù): 0/500 (您的評論需要經(jīng)過審核才能顯示)