Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет bo_ba ([info]bo_ba)
@ 2004-06-29 12:08:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
String languages
(from Marriott & Meyer)
Following Chomsky the syntax of sequantial languages is specified using a phrase-structure grammar.
Grammars are production rules describing composition of the grammatical components (sentences or noun phrases).
Example: English sentence (S) consists of a noun phrase (NP) followed by a verb phrase (VP). NP consists of a noun (N) preceded by optional article or determiner (D) and adjectives (A). VP consists of a verb (V) followed by NP. This definition for a subset of English with N, A, V, D is captured by production rules:
S -> NP VP,
NP -> D NP2
NP2->A NP2
NP2-> N
VP -> V NP
D -> the/a
N -> dog/dinner
V -> eats
A -> happy/black
Thus "The happy dog eats dinner" is syntactically valid sentense since it can be furnished a derivation: that is recursive application of a production rule to replace the right-hand side of a prodution by the left-hand side.

terminal symbols: real words (dog, eats) and non-terminal symbols: grammar categories (N, P,..) S- is a start non-terminal symbol.
The set of sentences, which may by produced from S in the grammar using productions in the grammar is language of the grammar.
Membership problem: is a sentence in the language of the grammar? is solved by a parser, which will or will not produce a derivation like above.


(Добавить комментарий)


[info]juan_gandhi@lj
2004-06-29 08:15 (ссылка)
Are you trying to start learning some computer sciences?

(Ответить)