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

首頁(yè)編程開(kāi)發(fā)其它知識(shí) → Loglan邏輯綜合可發(fā)音語(yǔ)言

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

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

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

  • 類(lèi)型:其它游戲大。677KB語(yǔ)言:英文 評(píng)分:5.0
  • 標(biāo)簽:
立即下載

Problem
問(wèn)題
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ā)音的語(yǔ)言,設(shè)計(jì)它是用來(lái)驗(yàn)證語(yǔ)言學(xué)上的一些原則性問(wèn)題,比如薩皮爾—沃爾夫假說(shuō)。它的句法精確明了,在文化上趨于中立,它的哲學(xué)是能省則省。該語(yǔ)言的語(yǔ)法集已經(jīng)被過(guò)份的簡(jiǎn)化——只有200條語(yǔ)法規(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的語(yǔ)句由一系列的單詞和名稱(chēng)組成,中間由空格隔開(kāi),并由一個(gè)點(diǎn)號(hào)(.)表示結(jié)束。Loglan的單詞均以元音結(jié)束;名稱(chēng)來(lái)自于該語(yǔ)言之外,由輔音結(jié)束。Loglan的單詞分為兩類(lèi)——小單詞和謂詞。小單詞指定了句子的結(jié)構(gòu);謂詞的形式為“CCVCV”或“CVCCV”,其中C代表一個(gè)輔音,V代表一個(gè)元音。(見(jiàn)下面的例子)

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

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.
寫(xiě)一個(gè)程序,讀入一組字符串并確定它們是不是正確的Loglan語(yǔ)句。

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語(yǔ)句均從新的一行開(kāi)始,并以句點(diǎn)(.)結(jié)束。一條語(yǔ)句可能占用多行,且單詞之間可能會(huì)多于一個(gè)空格。所有的輸入由一個(gè)獨(dú)占一行的#號(hào)表示結(jié)束。你可以認(rèn)為所有單詞的格式都是正確的。

Output will consist of one line for each sentence containing either 'Good' or 'Bad!'.
對(duì)于每一個(gè)輸入的語(yǔ)句,應(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)評(píng)論

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

    • 8 喜歡喜歡
    • 3 頂
    • 1 難過(guò)難過(guò)
    • 5 囧
    • 3 圍觀圍觀
    • 2 無(wú)聊無(wú)聊

    熱門(mén)評(píng)論

    最新評(píng)論

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

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