Sie sind auf Seite 1von 17

A Simple Explicatory Introduction

Formal Grammar:

Outline:

Its definition, components and aim Permutation Recursion Transformation (inference rules) Propositional logic and Predicate logic

Formal Grammar
A Formal Approach to grammar concerns itself with the incorporation of rules that do not judge the grammaticality of sentences or structures per se, but also formally represent well-formed ones.
They are a tool by virtue of which ALL-and-ONLY possible grammatical sentences are generated. Formal grammar deploys a formal language, a language of symbols and mathematical formulae. One hallmark that formal grammar is to bear is the perennial feature of generativeness. Suppose, you have an algebraic expression like 3x + 2y, and you can assign to x and y the value of any whole number, then that simple algebraic expression can generate an endless set of values, by applying the simple rules of arithmetic. When x = 2 and y = 10, the result will be 35, x = 2 and y = 1, the result will be 8, etc. The endless set of such results is generated by the operation of the explicitly formalised rules. If the sentences of a language can be seen as a comparable set, then there must a set of explicit rules which yield these sentences. Such a set of explicit rules is a generative grammar

Formal grammar is intended as a system of representation that with recourse to language of logic attempts at introducing a finite set of rules to generate an infinite set of structures, namely a language. Formal grammar comprises a set of formation rules that are to be deployed so as to devise strings, sentences. A string is an ordered sequence of symbols chosen selectively from a certain set or alphabet. Formation rules are rules for describing which strings of symbols formed from the alphabet of a formal language are syntactically valid within the language. The following rules describe a formal language L over the alphabet = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, +, =}: Every nonempty string that does not contain + or = and does not start with 0 is in L. The string 0 is in L. A string containing = is in L if and only if there is exactly one =, and it separates two valid strings in L. A string containing + is in L if and only if every + in the string separates two valid strings in L. No string is in L other than those implied by the previous rules.

Under these rules, the string "23+4=555" is in L, but the string "=234=+" is not. This formal language expresses natural numbers, well-formed addition statements, and well-formed addition equalities, but it expresses only what they look like (their syntax), not what they mean (semantics). For a language L, there is to be a formal grammar, G such that G = (V, , P, S) where V is the set of non-terminal symbols, is the set of terminal items, P is the set of production rules and lastly S is a designated member of , the starting symbol; S is on no condition derivable or deducible. It is the axiom from which we set to generate, derive or prove other formulas. In traditional logic, an axiom or postulate is a proposition that is not proved or demonstrated but considered to be self-evident. Therefore, its truth is taken for granted, and serves as a starting point for deducing and inferring other (theory dependent) truths. Production rules always take the following form, A,

where A V; whereas, (V U )*, so it is better to reformulate the rule in a more explicit comprehensive manner by putting it in the following form, (V U )*V (V U )* (V U )* * is named as the Kleene star (or Kleene closure) is a unary operation, either on sets of strings or on sets of symbols or characters. * also denotes concatenation, is the operation of joining single elements or characters to compose one concatenated quantity. For example, when characters x and y are concatenated, they form the combined item xy, also denoted as x||y. If A and B are two linguistic sets, then the concatenation of A and B (usually written AB) is defined as follows. {xy | x A and y B} In plain English: AB is the set of all strings which can be created by concatenating (putting together) a character from A with a character from B, for instance, if A = {snow, water}, and B = {falls, freezes}, then, AB = {snow falls, water freezes}. That is to say, the language of G, denoted as L(G), is defined as all those strings over that can be generated by starting with the start symbol S and then applying the production rules in P until no more non-terminal symbols are present. L(G) = { * S G* } , where is the generated strings, sentences and the relation S G* means the steps taken in G starting from S till reaching .

In the jargon of a formal grammar, the alphabet in a real natural language, for example English, would be the set of all English words. The set of nonterminals V could be a set of symbols, particularly speaking grammatical or lexical categories. As an example, lets take a small alphabet of = {walked, she, girl, the, happy}. Well let our set of non-terminals be V = {S, P, N, A, A, V}. P is meant to correspond to pronouns, N to nouns, A to adjectives, A to articles, and V to verbs. As usual, the start symbol will be S, and our production rules will be the following. S P V S A NV N AN V walked P she N girl A happy A the

This grammar allows to form the sentences She walked, The girl walked, The happy girl walked, and actually, The happy happy girl walked and the same sentence with happy repeated any number of times.

Permutation:
The generative capacity of a formal grammar is attributed mainly if not solely to its deployment of the permutation operation. Permutation is mapping the elements of a set to other elements of the same set, i.e., exchanging (or "permuting") elements of a set. Loosely speaking, permutation takes place through changing places or positions to yield some other possible combination of both a and b. Note, ab ba If a and b are to permute or exchange places in a combination of both, then another form of combination is possible with reversed order. Also, (a b) c a (b c) , a (b c) (a b) c Whenever three elements combine, each two can switch places with a third retaining its place. So, in the previous formula, if a and b are to permute then c holds still and if b and c are to permute then a holds still, all within the combination of a, b and c. If n denotes the size of the set the number of elements available for selection and only permutations are considered that use all n elements, then the total number of possible permutations is equal to n!, where "!" is the factorial operator. n ! = |n = n (n 1) (n 2) (n 3) .

The possible permutations of sequences to be made from the set {1, 2, 3} are represented in the set{(1, 2), (2, 1), (1, 2, 3), (2, 1, 3), (3, 2, 1), (1, 3, 2)}, which consists of six different sequences since 3! = 321= 6, total number of possible permutations. A grammar is said to be permutative so that it can generate all possible sentential combinations or formulae. Nonetheless, it must only embrace wff; that is, a generative grammar is to allow for all possible well-formed permutations.

We shall examine this well-diversified set, {a, the, beautifully, boy, girl, Mary, sings}. Ideally speaking, permutations of a set of seven items such as the one in question escalates to 5040 (7!), however, so as to guarantee well-formedness, chosen permutations are the ones abiding by the following set of production rules or Phrase Structure rules, S NP - VP NP Det - N NP PN VP V - (AdvP) AdvP Adv Det the, a N boy, girl V sings Adv beautifull

Checking the whole number of permutations against the set of grammatical production rules, the following set of permutations will hold and be integrated by the grammar, {(a girl sings), (a girl sings beautifully), (the girl sings), (the girl sings beautifully), (a boy sings), (a boy sings beautifully), (the boy sings), (the boy sings beautifully), (Mary sings), (Mary sings beautifully)}.

Recursion:
Some other peculiarity of natural language that formal grammar must be able to express properly is Recursion. Chomsky theorises that unlimited extension, the infinity trait of a language such as English is possible only by the recursive device of embedding sentences into sentences. Thus, a sentence like "Dorothy, who met the wicked Witch of the West in Munchkin Land where her wicked Witch sister was killed, liquidated her with a pail of water." is possible. Clearly, two simple sentences "Dorothy met the Wicked Witch of the West in Munchkin Land" and "Her sister was killed in Munchkin Land" are embedded in a third sentence, "Dorothy liquidated her with a pail of water," to obtain a very verbose lengthy rather intricate sentence. The resultant sentence is but an extended stretched-out ever-longer version of the embedding sentence. Recursion is the process a procedure goes through when one of the steps of the procedure involves rerunning the procedure. A procedure is a set of steps that are to be taken based on a set of rules. The running of a procedure involves actually following the rules and performing the steps.

A function in mathematics is recursive if it is definable by recursion and substitution from a number of basic functions. We can best characterise recursion formally as follows, n+1 f (n) = 0 , otherwise where n is the number of recurring elements; besides, if n does not belong to natural numbers at all or equals zero, then recursion is impossible. The very same above-mentioned equation, formal rule can be applied to linguistic recursions as well. In this case, the process or operation itself of recursion is symbolised by f(n) and n would refer to the number of objects (verbal completions) or predicative modifiers since recursive elements in sentences are always reckoned either as NPs that follow Vs or modifiers of Ns. If sentences do not allow any verb-complements or predicative modifiers (n = 0), then recursion is impossible to take place. Note,

,n1

Mary left: n = 0 (no complements), f(n) = 0. Mary said that John left: n = 1, f(n) = 2. Mary said that Harry said that John left: n = 2, f(n) = 3. Mary said that Harry said that Ann said that John left: n = 3, f(n) = 4. Mary said that Harry said that Ann said that Sue said that John left: n = 4, f(n) = 5

Note also, Richard died: n = 0 (no predicative modifiers), f(n) = 0. Richard who was teaching at Oxford died: n = 1, f(n) = 2. Richard who was teaching at Oxford who was a handsome sophisticated middle-aged man died: n = 2, f(n) = 3. Richard who was teaching at Oxford who was a handsome sophisticated middle-aged man who was married to his colleague Dr. Petrcha died: n = 3, f(n) = 4. Richard who was teaching at Oxford who was a handsome sophisticated middle-aged man who was married to his colleague Dr. Petrcha who had a house in Nottinghill died: n = 4, f(n) = 5. ..

An adequate theory of formal grammar is inevitably forced to not only have recourse to but also attempt at deploying logic. Part of the immensely paramount importance of incorporating logic in a theory of formal grammar arises out of it essential role it plays in capturing the linguistic feature of transformation. A transformational rule is one that is more or less entails a legitimate systematic conversion of one syntactic form or form of a sentence into another. A construction or sentence derived by such a rule is called a transform. Logically-represented grammar deals with transformations as a set of inference rules. Transformation can also be sighted as a logical consequence. Logical consequence is a fundamental concept in logic. It is the relation that holds between a set of sentences (or propositions) and a sentence (proposition) when the former "entailsthe latter. Logical consequence is the relationship between the premise(s) and the conclusion of a valid argument. In logic, a rule entitling one to transform an expression of one form into that of another such as: pq (p& q) p& q p & q (p& q) etc. where p and q are sentential variables and denotes negation.

The premise is equaled with the D-structure or the logical form of a given sentence; whereas, the conclusion is the yielded S-structure. Note, -The cat killed the rat The rat was killed by the cat : p q -John and Mary came John came and Mary did too: (p& q) p& q -Ann does not like coffee and Elizabeth also doesnt Neither do Ann nor Elizabeth like coffee: p & q (p& q)

Propositional logic intends to formally represent the relational linkages


between multiple different single sentences relating or combining logically so as to form rounded sentences. Simple (atomic) propositions are denoted by lowercase Roman letters (e.g., p, q), and compound (molecular) propositions are formed using the standard symbols for & for and, V for or, for if . . . then for if and only if, and for "not."

Each propositional variable is, on its own, a formula. If p is a formula, then p is a formula. If p and q are formulas, and is any binary connective, then (p q) is a formula. Here could be &, V, , or .

-John called on his grandmother and Sarah went to the hospital: (p& q) is wff if and only if John called on his grandmother: p is wff, and so is Sarah went to the hospital: q -If Mary will stay in the U.K. or she will travel to Canada: (pVq) is wff if and only if Mary will stay in the U.K.: p and She will travel to Canada: q are wffs. -If John is ill: p is wff, then John is not ill p is wff. -If If Mary succeeds, her parents will buy her a car: (pq) is wff, then Mary succeeds: p is wff and by necessity Her parents will buy her a car: q is wff too. -If Her parents will not buy her a car unless Mary succeeds: (pq) is wff, then it is surely the case that Her parents will not buy her a car along with Mary succeeds are wffs.

Predicate logic modifies or qualifies individual variables or projected


constants, namely sentential arguments in terms of functions. Take for example the following sentences: "Socrates is a man" and "Plato is a man". In propositional logic these will be two unrelated propositions, denoted for example by p and q.

In predicate logic; however, both sentences would be connected by the same property: M(X), where M(X) means that X is a man. A predicate function is to have some valence (number of its arguments), one or more. For example, P(X) is a predicate variable of valence 1; It can stand for "X is poor", P(X, Y) is a predicate variable of valence 2; It can stand for "X is poorer than Y", etc. Unlike propositional logic that explores the outward relations between sentences, predicate logic represents the internal structure of sentences. Due to its ability to formally express inward sentential structures, it can capture the linguistic peculiarity of ambiguity for it can assign different logical representations to a single ambiguous sentence. Note, 1.Mary and John are married. (a) Mary is married and John is married: M(a) & M(b) (b) Mary and John are married to each other: Rm(a, b)

2. He ate carrots on the balcony. (a)He ate carrots that grew on the balcony: E(a, G), G = B(b) . . E(a, B(b)) (b) He ate carrots while he was standing on the balcony: E(a, b) & B(a) 3. Ann saw her duck. (a) Ann saw her duck bird: S(a, b) (b) Ann saw her ducking: S(a, Q), Q = D(c) . . S(a, D(c)) 4.Old men and women came. (a)Old men and old women came: EX E Y ((M(X) & O(X)) C(X)) & ((W(X) &O(Y)) C(Y)) (b) Old men and women (with no specified age) came: EX EY ((M(X) & O(X)) C(X)) & (W(X) C(Y))

5. Someone has eaten every banana. (a) Each person has eaten a banana: E X A Y (E(X, Y)) (b) One person has eaten all bananas: A X E Y (E(X, Y)) 7. They are hunting dogs. (grammatical category ambiguity) (a) They [are hunting] dogs: A X A Y (H(X, Y)) (a) They are [hunting dogs]: A X (D(X) & T(X))

Das könnte Ihnen auch gefallen