Presentation is loading. Please wait.

Presentation is loading. Please wait.

Natural Language Processing Lecture 6 : Revision.

Similar presentations


Presentation on theme: "Natural Language Processing Lecture 6 : Revision."— Presentation transcript:

1 Natural Language Processing Lecture 6 : Revision

2 10/11/2015 NLP 2Revision 1. What is the part of speech? Give 4 examples Each part of speech explains what the word is, and how the word is used. In fact, the same word can be a noun in one sentence and a verb or adjective in the next. Example : noun, verb, preposition, pronoun 2. Complete the following sentences A closed class is a class that contains a relatively fixed set of words; An open class is a class that contains a constantly changing set of words Transitive verb: a verb that take a direct object complement. Intransitive verb: a verb that do not take a direct object. 3. Give 3 examples for closed classes Articles: a, an, the Conjunctions: and, but, or,... Demonstratives: this, that, these,...

3 10/11/2015 NLP 3Revision 4. Give the definition of the Tagging Tagging :The process of assigning a part-of-speech to each word in a corpus 5. Describe the three tagging methodologies Rule-Based Tagging : use a linguistic rules Stochastic Tagging : Based on probability of certain tag occurring given various possibilities. Requires a training corpus Transformation-Based Tagging : Combination of Rule-based and stochastic tagging methodologies

4 10/11/2015 NLP 4Revision 6. What is the role of the regular expressions? A regular expression is a formula in a special language that is used for specifying the regular languages. 7. What is the definition of : String : is a sequence of letters Defined over an alphabet Language : is a set of strings 8. What does specify the following regular expressions? /[3-9]*[A-Z]/ : zero or more digit followed by a capital letter \D : /[^0-9]/ : any non digit \w : : /[A-Za-z0-9 ]/ : any alphanumeric or space

5 10/11/2015 NLP 5Revision 9. Give the role of the Finite State Automata FSA recognize the regular languages represented by regular expressions 10. FSA is a 5-tuple consisting of : Q: set of states  : an alphabet of symbols q0: A start state F: a set of final states in Q  (q,i): a transition function mapping Q x  to Q

6 10/11/2015 NLP 6Revision 11. Give 3 words accepted by the following FSA abba, baba, aaaaba, baaaabbaba,

7 10/11/2015 NLP 7Revision 12. What is the syntax? Syntax is the study of the rules governing the way words are combined to form sentences in a language. 13. What is the role of : Syntactic analysis : is concerned with the construction of sentences. Syntactic structure : indicates how the words are related to each other. Lexicon : indicates syntactic category of words. Grammar (typically Context Free Grammar) : specifies legitimate concatenations of constituents(set of rules)

8 10/11/2015 NLP 8Revision 15. Describe the 4 types of grammar

9 10/11/2015 NLP 9Revision 16. Complete the sentences : Groups of words that belong together are called constituents The component that determines the properties of the constituent is the head, and the constituent can be referred to as a phrase. 17. Draw a labeled tree diagram for the following English phrases. a. The ancient pyramids b. in the early evening c. Drove a car

10 10/11/2015 NLP 10 Revision The NDet ancient Adj pyramids NP PP P NP The NDet early Adj evening in

11 10/11/2015 NLP 11 Revision Drove NPV a car VP Det N

12 10/11/2015 NLP 12Revision 18. Rewrite the following sentences with Phrase Structure Rules. The cat sits on a mat Peter told the truth.

13 10/11/2015 NLP 13Revision VPP on NPP a DetN matThe N sits S NPVP Det cat The cat sits on a mat

14 10/11/2015 NLP 14Revision V NP the DetN truth Peter told S NVP Peter told the truth

15 10/11/2015 NLP 15Revision 19. Draw the trees for the following sentences: The boy saw the man with the telescope The children put the toy in the box

16 10/11/2015 NLP 16Revision VPP with NPP the DetN telescopeThe N saw S NPVP Det boy NP the DetN man The boy saw the man with the telescope

17 10/11/2015 NLP 17Revision VPP in NPP the DetN boxThe N put S NPVP Det children NP the DetN toy The children put the toy in the box

18 Exercises 1.Build a non-deterministic finite automata that recognizes words in the alphabet {a, b} that end with bab.

19 2. Give the transitions tables 1 3 2 4 5 a a a a a b b b a,b ba 4-51-2-3-4-51 3-52 23 454 5

20 b 3. Write the transitions table of the following automata. What is the recognized language? 10 ABA CBB CCC The recognized language is : 1*0+1(0 |1 )*

21 4. Determine the language for each regular expression : L(001) = {001} the word 001 L(0|10*) = {0,1,10,100,1000,10000000,100000000 } 0 or all words that contain 1 followed by 0 or more L(0*10*) = { 1,01,10,100,001,010,00001,1000000000,000100000 } All words that contain 1

22 L(  )* = { w| w is a string of even length} all words over  L((0(0|1))*) = {ε,0,01,001,0001,0101 } all words that begin with 0 or ε L((0|ε)(1| ε)) = {01,0,1, ε } L ((0|ε|b)(1| a)) = {01,0a,1,a,b1,ba }


Download ppt "Natural Language Processing Lecture 6 : Revision."

Similar presentations


Ads by Google