CSC 350 Comp. Ling. Exam 1 Page 1 of 5 Name _____ KEY 100 pts ________ MULTIPLE CHOICE/SHORT ANSWER. 3 points each. Choose the SINGLE BEST answer. 1. One component of human language is phonology. This has to do with how a) individual letters are sounded b) pieces of words are sounded B c) complete words are sounded d) complete sentences are sounded 2. Morphology is another component of human language. One aspect of this, inflection, has to do with a) derivation (etymology - where a word comes from) b) length of words D c) sound (pitch, duration) variations d) tense and number 3. When viewing a Prolog program as a collection of theorems and axioms, which type of a cognitive process would you be attempting to model? B a) procedural b) logical c) data d) functional 4. Prolog is said to have procedural aspects because a. you have to follow special procedures when writing a program. b. it acts like a data-base retrieval procedure. c. the programmer has to understand how control passes between statements to completely understand the program's logic. C d. that's the name the language gives to its methods. 5. Pragmatics involves a. finding the simplest way to say something. b. recognition of a sentence by a computer. c. the use of language in context. C d. categorizing the structure of legal sentences. 6. Which one could be a correct translation into Prolog of the English statement "If it moves tax it."? a) mobile(X) :- tax(Y). b) mobile(X) :- tax(X). C c) tax(X) :- mobile(X). d) tax(X) :- mobile(Y). 7. Define syntax. The form of a language, syntax defines what sentences are legally acceptable but does not impose any meaning on them. 8. Define semantics. The meaning of a sentence in a language. Frequently the meaning can not be derived from the sentence alone, but must be considered in the context in which it occurs. 9. Define "language". A language is a set of strings of symbols defined over some vocabulary. Or, a language is the set of all strings of terminals derivable from the start symbol. 10. The description of semantics that explains sentences in terms of their effects on predicate evaluation is called D a) denotational b) morphotactic c) operational d) axiomatic CSC 350 Comp. Ling. Exam 1 Page 2 of 5 Name _____ KEY 100 pts ________ 11. Natural language processing is a) mapping between two or more human languages. b) text retrieval from a data warehouse based on human language input. c) automated extraction of meaning from human language. C d) conversion of spoken words to symbols. 12. The parse tree of a sentence is a) inherent in the language b) inherent in the grammar B c) identical for all grammars d) identical for all sentences 13. Some grammars are arguably "better" than others because a) their associated parse trees correspond to the language's syntax. b) their associated parse trees correspond to the language's semantics. c) their associated derivations are always left-to-right. B d) their associated derivations are always right-to-left. For each of the next three problems, choose a sentence from the list below which illustrates the specified concept. You should not use the same sentence twice. 14. Implicature and state what is implied by the sentence you chose: f) Do you have five dollars? - would you lend me five dollars? Other choices are a bit more difficult, as most don't carry the idea of clearly implying meaning disjoint from the semantics of the given syntax. E.g., c) I am smarter than Einstein. - that Einstein is alive or Einstein is smart would not normally be the sense in which this is used; similarly for e) Has anyone seen my pet elephant? - that I own an elephant 15. Presupposition and state what is presupposed by the sentence you chose: d) Have you stopped stealing doughnuts from the cafeteria? - that you've been stealing doughnuts from the cafeteria c) I am smarter than Einstein. - that Einstein is alive and/or smart e) Has anyone seen my pet elephant? - that I own an elephant 16. Cancellation and state the idea contained in the sentence that is being cancelled and that part of the sentence that is doing the cancellation: a) Compared to the rest of the state, Onondaga Lake has high quality water. - Onondaga Lake having clean water is cancelled by the "Compared to the rest of the state" phrase b) The President staged a phony war to distract attention from his womanizing in the movie "Wag the Dog". - that the President staged a phony war ... is cancelled by the phrase "in the movie ..." Sentence choices ---------------- a) Compared to the rest of the state, Onondaga Lake has high quality water. b) The President staged a phony war to distract attention from his womanizing in the movie "Wag the Dog". c) I am smarter than Einstein. d) Have you stopped stealing doughnuts from the cafeteria? e) Has anyone seen my pet elephant? f) Do you have five dollars? CSC 350 Comp. Ling. Exam 1 Page 3 of 5 Name _____ KEY 100 pts ________ Consider this context free grammar, G, related to radio direction finding: Terminal = { dah, dit } Nonterminals = { A, B } Productions = { A --> dah, A --> dah B, B --> dit, B --> dit A, A --> B } 1 2 3 4 5 Start = A 17. Write down the 5 shortest sentences in the language. { dah, dah dit, dit, dit dah, dit dit } [note that "dah dah" is not included] 18. Derive "dah dit dit dit" from A using a left-most derivation. Be sure to label the "arrows" with the production used. Answer: A ==> dah B 2 ==> dah dit A 4 ==> dah dit B 5 ==> dah dit dit A 4 ==> dah dit dit B 5 ==> dah dit dit dit 3 19. Pattern matching: Here is some Prolog for several rules which define the predicate 'recipe/1'. The numbers on the left are for reference only. 1. recipe([X,Y,Z | Rest]) :- write('second ingredient is '), write(Y). 2. recipe([X,Y | Rest]) :- write('second ingredient is '), write(Y). 3. recipe([X]) :- write('one ingredient is '), write(X). 4. recipe(X) :- write('ingredients are '), write(X). Which one(s) of the rules will be tested (i.e., its body will be executed) given the query: | ?- recipe([fish_pie,leek_pie]). 2 and 4 CSC 350 Comp. Ling. Exam 1 Page 4 of 5 Name _____ KEY 100 pts ________ 20. How would Prolog respond in each case, given the following code? country(shania). rock(bono). rock(toni). folk(bob). soul(toni). pop(X) :- country(X). pop(X) :- rock(X), soul(X). -a- -b- -c- -d- -e- | ?- pop(toni). yes yes yes no no | ?- pop(bono). yes yes no yes yes | ?- pop(shania). yes no yes yes no Answer: C MATCHING. 2 Points each. Fill in the blank with the letter of the most appropriate definition from the next page. No letter should be used more than once. --------------------------------- | a | | V | ____ ------ ---- b | ---- | b | ---- | _T_ 21. -->| q |--------->|| q ||-------->|| q || | 0 | || 1 || || 2 || ---- | ---- | | ---- | ---- ------ | | a, b | V | a ---- _______ ------------->| q | | a,b | 3 |<------ ---- ____ ---- a,b | ---- | b ---- _______ _R_ 22. -->| q |--------->|| q ||--------->| q | | a,b | 0 | || 1 || | 2 |<------ ---- | ---- | ---- ---- | ^ |_a_| _K_ 23. operational semantics _O_ 24. the modeling of natural language _D_ 25. parse tree _Y_ 26. transducer _M_ 27. man-machine interface _U_ 28. open class _E_ 29. left-most derivation _N_ 30. the modeling of human behavior _G_ 31. bottom-up derivation _A_ 32. alphabet _C_ 33. derivation _P_ 34. sentence _Q_ 35. language of a grammar _F_ 36. top-down derivation _H_ 37. sentential form _L_ 38. denotational semantics _B_ 39. grammar _W_ 40. implicature CSC 350 Comp. Ling. Exam 1 Page 5 of 5 Name _____ KEY 100 pts ________ a) collection of symbols from which sentences are built b) mechanism for specifying syntax c) sequence of transformations from start symbol to sentence d) graphical representation of a derivation e) process in which left-most nonterminal is always chosen for replacement f) process of parsing beginning with root of tree g) process of parsing beginning with leaves of tree h) string of terminals and nonterminals derivable from the Start Symbol i) mastery of the underlying rules of a language j) application of the underlying rules of a language k) the meaning of a sentence is defined to be how an abstract machine would behave while interpreting it. l) the meaning of a sentence is defined by a mathematical description. m) a mediator between humans and machines. n) artificial intelligence o) linguistics p) string of terminals derivable from the Start Symbol q) set of all strings of terminals derivable from the Start Symbol r) automaton whose language is (a+b)a* s) automaton whose language is (a+b)(a*(bb*a)*)* t) automaton whose language is a + b + bb u) category of words provided with a mechanism for expansion v) category of words allowed to take affixes w) meaning indirectly derived from a component of a sentence x) finite state machine with an input alphabet only y) finite state machine with input and output alphabets z) how sounds are used in a language