Supplement to Ch. 23: Natural Language for Communication < 인공지능 > 강의노트 장병탁서울대학교컴퓨터공학부 & 인지과학 / 뇌과학협동과정 http://bi.snu.ac.kr/~btzhang/ Version: 20180528
목차 언어, 사고, 소통...... 3 자연언어처리.......... 5 음성인식............... 12 정보검색.... 16 기계번역... 17 질의응답 / 챗봇............. 18 스마트스피커................. 19 대화로봇....... 20 화행론.... 21 Reading Assignments.......... 27 2018 Byoung- Tak Zhang, Seoul National University 2
언어, 사고, 소통 q 언어 Ø 소리, 문자, 기호, 행동 q 언어와사고 Ø 사피어 - 워프가설 (Sapir- Whorf Hypothesis) Ø 우리는모국어의범위안에서자연세계를판단한다 q 언어와소통 Ø 기호와소통으로서의언어 Ø 화행론 (Speech Acts) https://www.youtube.com/watch?v=wnzlbytzsqy 2018 Byoung- Tak Zhang, Seoul National University 3
자연언어처리와인공지능 자연언어처리 (Natural language processing, NLP) Immense field with many potential applications, including translation from one language into another, retrieval of information from databases, human/computer interaction, and automatic dictation. AI- hard 문제 To produce a system as competent with language as a human is would require solving the AI problem. 난점 Resolving pragmatic ambiguities which seems to require reasoning over a large commonsense knowledge base and parsing systems adequate to handle natural languages. Ex) P: Well, I ll need to see your printout. S: I can t unlock the door to the small computer room to get it. P: Here s the key. (c) 2018 Biointelligence Lab, Seoul National University 4
자연언어처리 자연언어처리 (NLP) 1. 자연언어이해 (Natural Language Understanding, NLU) Taking some spoken/typed sentence and working out what it means 2. 자연언어생성 (Natural Language Generation, NLG) Taking some formal representation of what you want to say and working out a way to express it in a natural (human) language (e.g., English) 자연언어처리의단계 음성언어, 문자언어 단어, 문장, 대화, 텍스트 형태론, 구문론, 의미론, 화용론 (c) 2018 Biointelligence Lab, Seoul National University 5
자연언어처리의어려움 자연언어처리의어려움 다의성 (Polysemy) I keep the money in the bank. I walk along the bank of the river. 중의성 (ambiguity) Time flies like an arrow. I saw a man with a telescope. 다양성 (Diversity) She sold him a book for five dollars. He bought a book for five dollars from her. 관련지식 어휘적지식 문법적지식 상황 / 문맥지식 6
자연언어이해 Input/output data Processing stage Other data used Frequency spectrogram freq. of diff. speech recognition sounds Word sequence grammar of He loves Mary syntactic analysis language Sentence structure He loves Mary meanings of semantic analysis words Partial meaning context of Ξx loves(x,mary) pragmatics utterance Sentence meaning loves(john,mary)
구문분석 - 문법 sentence -> noun_phrase, verb_phrase noun_phrase -> proper_noun noun_phrase -> determiner, noun verb_phrase -> verb, noun_phrase proper_noun -> [mary] noun -> [apple] verb -> [ate] determiner -> [the]
구문분석 - 파싱 sentence noun_phrase verb_phrase proper_noun verb noun_phrase determiner noun Mary ate the apple
파싱 Parsing Deciding whether or not an arbitrary string of symbols is a legal sentence Syntactic analysis The parsing process Various parsing algorithm Top- down algorithm Bottom- up algorithm Usually proceeds in left- to- right fashion along the string (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 10
의미분석 PP ß Prep NP Specify the semantic association for PP in terms of the semantic associations for Prep and NP These semantic associations are indicated by expressing each nonterminal symbol as a functional expression; for example, PP(sem) At the conclusion of parsing, the formula associated with the nonterminal symbol S is then taken to be the meaning of the string. With these associations, the grammar is called an augmented phrase- structure grammar, and the parsing process accomplishes what is called a semantic analysis. (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 11
음성인식 In speech recognition you observe an acoustic signal (A = a 1,,a n ) and you want to determine the most likely sequence of words (W = w 1,,w n ): P(W A) Problem: A and W are too specific for reliable counts on observed data, and are very unlikely to occur in unseen data 12
음성인식모델 P(W A) could be computed as P(W A) = max P(w i a i ) Given a candidate sequence W we need to compute P(W) and combine it with P(W A). Applying Bayes rule: argmax W The denominator P(A) can be dropped, because it is constant for all W. The decoder combines evidence from The likelihood: P(A W) The prior: P(W) a i w i P(W A) = argmax W P(A W ) P(A W )P(W ) P(A) n P(a i w i ) i=1 P(W ) P(w 1 ) P(w i w i 1 ) n i= 2
자연언어처리응용 기계번역 (Machine Translation) 정보검색 (Information Retrieval) 인간컴퓨터상호작용 (HCI) 질의응답시스템 (QA) 대화시스템 (Dialogue) 챗봇 (Chatbots) 스마트스피커 (Smart Speakers) 대화로봇 (Talking Robots) (c) 2017 Biointelligence Lab, SNU 14
기계번역 n 기계번역 (Machine Translation, MT) n n 최근딥러닝을통해급격한성능향상구글의신경기계번역시스템 (Neural MT, NMT) 2017, 장교수의딥러닝, SNU CSE Biointelligence Lab., http://bi.snu.ac.kr 3
Text Data 정보검색 Preprocessing and Indexing Text Classification Classification System Information Filtering System 16 Information Filtering user profile filtered data feedba ck Information Extraction question answer DB Template Filling & Information Extraction System DB DB Record Location Date (c) 2000-2007 SNU CSE Biointelligence Lab, http://bi.snu.ac.kr/
질의응답 (QA) IBM Watson A technology platform that uses natural language processing and machine learning to reveal insights from large amounts of unstructured data.
챗봇 / 가상비서 18
스마트스피커 Amazon Echo Google Home SKT Nugu 19
대화로봇 Jibo (MIT) Family Robot Buddy (Blue Frog Robotics)
화행론 (Speech Acts) Communicative act Communicate with other agents in order to affect another agent s cognitive structure. Communicative medium Sounds, writing, radio Communicative acts among humans often involve spoken language. So, communicative acts are also called speech acts. Speaker Speech acts Hearer (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 21
발언 (Utterance) Physical manifestations Physical motions Acoustic disturbance Flashing lights Etc. The utterance must both express the propositional content and the type of the speech act that it manifests. E.g. put block A on block B Request & On(A,B) (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 22
화행의종류 Representatives Those that state a proposition Directives That request or command Commissives That promise or threaten Declarations That actually change the state of the world, such as I now pronounce you husband and wife (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 23
Perlocution and Illocution Speech acts are presumed to have an effect on the hearer s knowledge If our agent A1 commits a representative speech act informing a hearer A2 that a proposition q is true, then A1 can assume that the effect of this act is that A2 knows that A1 intended to inform A2 that q. Perlocutionary effect The effect on the hearer intended by the speaker Illocutionary effect The effect the speech actually has Indirect speech acts Speech acts whose perlocutionary effects are different from what they appear to be. E.g. You left the refrigerator door open (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 24
효과적인소통 (Communication) Substantial efficiency of communication Can often be achieved by relying on the hearer to use its own knowledge to help determine the meaning of an utterance. If a speaker knows that a hearer can figure out what the speaker means, then The speaker can send shorter, less self- contained messages. One of the main reasons why it is so difficult for computers to understand natural languages is NL understanding requires many sources of knowledge including knowledge about the context. (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 25
문맥의역할 If the hearer and speaker share the same context Then that context can be used as a source of knowledge in determining the meaning of an utterance. Use of context Allows the language to have pronouns. Can include previous communication. Current environment situation. Ex) Block A is clear and it is on block B. Hearer can under stand it means the block A from context. Ex) I know that block A is on block B The hearer can understand which person (or machine) the word I refers from context of the utterance. (C) 2000 SNU CSE Artificial Intelligence Lab (SCAI) 26
Reading (Watching) Assignments Google s AI Assistant Can Now Make Real Phone Calls, 2018. ( 비디오 ) SKYPE Voice- call Translator (Automatic), 2016. ( 비디오 ) Real- time Skype Traslator by Microsoft Research, 2014 ( 비디오 ) 'AI 비서의실수 ' 아마존알렉사, 가족대화외부에잘못전송, 연합뉴스, 2018.5.25 ( 신문기사 ) AI 계의반항아, ' 테이 ' 16 시간만에운영중단, 더기어, 2016.3.28 ( 신문기사 ) Q: 위의비디오데모와신문기사를참조하여인간의언어를이해하는인공지능기술의현재수준을논하시오. 기계가사람의말을보다완전히이해하기위해서는앞으로어떤연구가더진행되어야할것인가? 2018 Byoung- Tak Zhang, Seoul National University 27