140 likes | 346 Views
Chapter 15 Natural Language Processing (cont). 323-670 Artificial Intelligence ดร.วิภาดา เวทย์ประสิทธิ์ ภาควิชาวิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์ มหาวิทยาลัยสงขลานครินทร์. Figure 15.1 P. 378
E N D
Chapter 15Natural Language Processing (cont) 323-670 Artificial Intelligence ดร.วิภาดา เวทย์ประสิทธิ์ภาควิชาวิทยาการคอมพิวเตอร์ คณะวิทยาศาสตร์ มหาวิทยาลัยสงขลานครินทร์
Figure 15.1 P. 378 English sentences are incomplete descriptions of the information that are intended to convey. The same expression means different things in different context. No natural language program can be complete because of new words, expression, and meaning can be generated quite freely. There are lots of ways to say the same thing. NLP Problems Page 2
1) Processing written text using lexical, syntactic, and semantic knowledge of the language the require real world information 2) Processing spoken language using all information needed above plus additional knowledge about phonology handle ambiguities in speech NLP Problems Page 3
Natural Language processing Language translation / multilingual translation Language understanding Figure 14.5 p. 365 Interaction among component Figure 14.6 p. 366 A speech Waveform NLP Page 4
1) Morphological Analysis 2) Syntactic Analysis 3) Semantic Analysis 4) Discourse Integration 5) Pragmatic Analysis boundaries between these five phrases are often fuzzy. Step in NLP Page 5
Individual words are analyzed into components Nonword tokens such as punctuation are separated from the words I want to print Bill’s.int file. 1. Morphological Analysis file extension proper noun possessive suffix Page 6
linear sequence of words are transformed into structures show how words relate to each other English syntactic analyzer If do not pass the syntactic analyzer reject (Boy the go to store the) 2. Syntactic Analysis Page 7
Example of syntactic analysis Figure 15.2 p. 382 RM2, RM5, RM5 A knowledge base Fragment Figure 15.3 p. 383 User073, F1, Printing, File_Structure, Waiting Mental Event/ Physical Event Animate/Event Partial meaning for a sentence Figure 15.4 p. 384 2. Syntactic Analysis Page 8
the structures created by the syntactic analyser are assign meanings mapping between the syntactic structure and objects in the task domain If no mapping reject (colorless green ideas sleep furiously) 1) It must map individual words into appropriate objects in the knowledge base or database. 2) It must create the correct structures to correspond to the meanings of the individual words combine with each other. 3. Semantic Analysis Page 9
the meaning of the individual sentence may depend on the sentences that precede it and may influence the meanings of the sentences that follow it. (Ex. John want it.) “It”depends on the previous sentence. Current user who type word “I” is User068 = Susan_Black We get F1 with filename in /wsmith/ directory 4. Discourse Integration Page 10
The structure representing what was said is reinterpreted to determine what was actually meant. (Ex. Do you know what time it is?) we should understand what to do.... Understand to decide what to do as a result Representing the intended meaning Figure 15.5 P. 385 5. Pragmatic Analysis Page 11
Top-down Parsing Begin with start symbol and apply the grammar rules forward until the symbols at the terminals of the tree correspond to the components of the sentence being parsed. Bottom-up Parsing Begin with the sentence to be parsed and apply the grammar rules backward until a single tree whose terminals are the words of the sentence and whose top node is the start symbol has been produced. Syntactic Processing Page 13
similar to finite state machine Figure 15.8 p.392 An ATN network Figure 15.9 p.3923An ATN Grammar in List Form sentence “The long file has printed.” S NP Q1 AUX Q3 V Q4 (F) halt NP Det Q6 Adj Q6 N Q7 (F) ATN : Augmented Transition Network (S DCL (NP (FILE (LONG) DEFINITE)) HAS (VP PRINTED)) Page 14