Meaning Representation for Natural Language Understanding - Mariana Romanyshyn | - ODSC Europe 2019

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] I now think I should have shortened that by our biography skating just right hello everyone this is the last talk of the day I know everybody is kind of tired and so on so I'm gonna try to speak in a with happy emotions so that you don't fall asleep and today we are talking about meaning representation for natural language understanding this is a hobby of mine this is not something I do it grandly and if this is also a hobby of yours I'll be happy to discuss it talk to the talk alright so I'm gonna first give you a quick introduction to meaning representation and after that we're gonna talk about a very specific development recent development in the area of natural language processing that is called abstract meaning representation so in particular we're gonna talk about what it means how to build one and how to use one okay so let's start with an introduction how do we humans understand each other how do we understand the sentences how do you guys understand the sentences that I'm saying so first of all we all know the meanings of words and of course words can have multiple meanings but if you order words in a particular way right you know that these words interconnect well with one another yep what do they do something something broke okay okay this words interconnect with one another and we refined this meaning from the connection that the words are in also we know that usually know the context of the sentence so if I'm saying some sentence it usually follows a different one and yeah I don't know what's happening here but thank you very much so we we know the context right we also know a lot about the world around us and that's why we know what's probable and what's not probable yep yeah doing full screen sure good no not good [Laughter] yeah I'm very sorry okay try again okay oh sorry oh yes good now it works so we know a lot about the world around us so we know what's probable and what's not probable and also I'm like doing these gestures with my hands which also gives you some information so we use nonverbal communication all the time and that's why luckily in everyday wealth situations like this like almost never occur because you usually know what people mean right you have all this information so the question is can we teach the computer to understand the meaning of a sentence in the same way as we humans do now what is the meaning let's talk about some very simple primitive ways to extract the meaning of the text so here we have a piece of attacks that says children wanted to eat old cookies they were delicious so the easiest way to represent the meaning of this tax is to find the most important words in this text and there are many like very simple nice approaches in natural language processing that help you normalize this text lemma ties the worlds but the words pick the most important words and then you get something like sorry it doesn't work now sorry guys something else broke now that's I guess my luck let's see if I can do this from my PowerPoint or something I don't know okay play it doesn't have all the nice bounces [Music] hello ok alright I think it works now alright so and we can pick all of the most important words from this text which would be cookie child eatin delicious and for many texts in natural language processing such level of understanding is enough so for example if you want just to extract to do topic modeling to extract a cloud of keywords just to get an understand in your world understand what this text is about but what if I reorder the words in this text and now we have a different tact the first cookies wanted to eat all children and they were delicious right so in some kind of cartoon this should be probable if we extract all of the most important words in this text we get the same set of words cookie child eaten delicious this means that the meaning of both text is the same who agrees that the meaning of both text is the same well I guess this person is doing NOP because he knows what he's doing so it all depends on the test that you're solving NLP if you're working on text classification and you just need to classify tags like medical text from text about children and cookies this is this these two tags are the same they but they have the same meaning but if you need to solve some more intricate tasks in natural language processing like check summarization a question answering this is not enough so to both build from office space I think we can do better than that and linguistics is something that helps us there so the next level of text analysis which would be will be more which will give us more information if doing syntactic parsing so defining parts of speech of the words in the sentence in the sentence and building the syntactic representation of the sentence that syntactic representation that you see on the screen is called the dependency parse tree a dependency parse tree shows you the dependencies between words in the sentence for example here you can see that children are the subject of the verb wanted and to eat is the open/close or complement this is a scary this a scary linguistic terms of the world wanted and so on and kind of a syntactic parse tree can give us information on who is the subject and what is an object of a certain action right but it's not always the case because this representation is just formally linguistic because if you look at the word eat we know as people that children in this case are eating cookies right but the word eat does not have a dependency to the word children right we have to trace this dependency and and find the subject we have to go to once and then find the subject of one thing in Swan so syntactic parsing does give us a lot of information and now we can differentiate children want to treat all cookies and cookies wanted to yo children but still you have to trace all of these parse trees and you have to find this hidden subject in reality reality is even more difficult because in reality the doer of the action is not always the subject I'm gonna show you an example then the action is not always presented by a verb that's another thing and paraphrases we would want to paraphrase is to have the same representation but in if you just syntactic parsing like paraphrases would have different representations let's see so let me paraphrase the the sentence and say something like children's wish was to eat your cookies right the meaning is the same but the syntactic trees are now different so we have different representations which is not sufficient for for representing the meaning right of the text also you can see that in the first sentence like wanting is expressed but with the work to want and in the second one with a noun to wish right so the analysis will be different and children in the in the second example are no longer subject of anything so I think we can do better than that right and that's how we get to the next level that is called semantic parsing and over the years computational linguists all over the world were trying to find a very nice representation of a meaning that will that we'll be able to work with all of these previous you know requirements that if we paraphrase the same information we want to have the same representation if we reordered the words and the meaning changes we want the representations to be different right and you can see now all of these scary words like universal conceptual cognitive annotation and I think you're in your head something like this what what does this all mean we're not going to discuss all of the all of these formalisms I'm gonna give you a couple I'll show you a couple of things a couple of slides about lambda calculus because it's widely used in question-answering domain then also about semantic role labeling because it's used in fact extraction in NLP and all and then we will talk about absolute min representation okay so lambda calculus this typed lambda calculus expressions are one of the ways to represent meaning in natural language processing and the idea is to represent a sentence as a truth uh Turin's right so in this case we are representing a sentence as the sentence will be true if there exists a set of entities that are children then if there is a set of entities that are cookies and they should be like this this should be a set of entities that contains all cookies you see quantifiers here right and there's an event of wanting whereas children are wanting another event of eating of those children eating cookies right so how this can be useful in in practice in practice these representations sorry about formatting because I'm using different presentation so in in practice it typed lambda calculus expressions are used in question answering systems so when you have a knowledge base it's usually yeah the results should be brilliant so who's watching the slides on the in the slide suspect so if you have a knowledge base entities in this knowledge base are have a relation between them right so you can express you can show a knowledge base as the who who's worked with RDF knowledge basis you have like triplets right so the dependency and then two entities that are bound by this dependency so we can formulate we can parse our natural language sentences into these lambda type expressions whereas where each expression will be a predicate that takes two arguments as as these entities we are looking for in the knowledge base and then we can do a search in the knowledge base for the the predicate that we defined here the predicate is capital and it doesn't matter what was the formulation in the natural language right so we can use there are many syntactic parsers that you can find they're open for semantic parsers that will parse these sentences on the top into a lambda type expression that that follows and then you could use you could use that expression in order to search across a knowledge base another thing that I wanted to talk about is semantic role labeling this is also called shallow semantic parsing the idea is that we want to find semantic roles of a certain event so if event is to detain somebody then there are semantic rules like the detainee the one who is detaining so the detainer and there may be like additional semantic roles like the time of detainment the location of detainment the manner in which somebody was detained and so on so forth so in this case we have three sentences with the same meaning they are paraphrased but the roles are stayed the same they are attached to the same person so the police officer is also always the detainer okay semantic role labeling is frequently used for the tasks of fact extraction so think of the tasks when you need to go through gigabytes of data and you want to find all examples when somebody filed the lawsuit against somebody else and you want to extract them into a database and then you know process this database in any way you like so tasks like this are are done usually in NLP with semantic role labeling or like text mining in the medical domain and so on there might be multiple examples so the thing that you have to the question that should pop in your mind is okay so for the word detain we have the detainer detainee and then some other semantic rules but for each verb we will have like different semantic roles and you're right like if we have the event of wanting then we have the winter the thing wanted and maybe the beneficiary because if I want happiness for my children then my children are the beneficiary of the event of wanting right or if we have the event of eating then we can have the consumer and the thing it eaten and so on so forth so for practical reasons link was decided that okay so we will whatever is their role the semantic role we will mark the doer of this role like what is the winter a meter or detainer as argument zero and the object of this role is argument one this is what you see here right the mapping and then we will just mark additional roles with with the keywords we have the temporal role the location the direction and so on so forth and there are many resources where you can find these semantic roles for each event written out and the event together with semantic roles is called a frame so in prop Bank that is mentioned here on the slide is that such a semantic resource that has like 7,000 different frames with with semantics semantics frames with semantic roles written out for each for each type of event for each frame so you can find also tools online and demos of NLP natural language processing tools that do semantic role labeling and use them in your projects if you need for example Ellen and Opie is a quite recent library criterion and Opie toolkit that has a demo for semantic role labeling and for our tax it finds two events to want to eat the doer of each event is children and the the object what is wanted in what is eaten here is here on the slide and you can see this notation that the doer is argument zero and the object that is the action is applied to is argument one for example the every semantic parsing algorithm both typed lambda calculus and abstract mean representation that we're going to discuss today in semantic role labeling all of them usually work using the syntactic parse trees the like like the one that I showed before this dependency parse tree semantic role labeling usually uses uses a different kind of syntactic representation this is also a syntactic parse tree but it's a constituency parse tree it parses a sentence into small constituents and then builds it hierarchy up to the top of the sentence so a semantic role labeling this first we identify our verbs in the sentence and then for each verb we try to find constituents that perform certain semantic roles for example if you find the word eat we then trace the tree and find the first constituent children this is a noun phrase don't worry if you don't know the notation that doesn't matter you find the noun phrase children and then you your classifier predicts that this is this is for for eat this will be argument 0 and then you trace the tree later and then you find that all cookies will be argument 1 for this specific event and there are different features that are used for example the distance from the verb to the constituent that you're trying to label and so on so forth so all kinds of different features can be used here so semantic role labeling sorry has a couple of drawbacks too because we are working on this level of chunks of text so for example all cookies will be two words that perform a certain role in the text and then you cannot match all cookies to another cookie that will be mentioned later in the tax for example so the idea of the next representation that we're going to discuss of abstracting representation is to move away from words and work only on the concept level like we were talking about the meaning right so we should work on the concept level and here you can see an absolute mean representation for these sentences this is again for paraphrases of the same meaning like children wanted children's wished was what children desire children felt like and so on but all of them should have the same meaning representation and the abstract mean representation that we see here here we can see that we have an event of wanting I'm going to explain all of the notation later and then we have an argument zero which is children and we apply we defined a variable see that we're going to reuse later then argument one is the event of eating then the argument 0 so the doer of eating is again C which was the child defined earlier and then we have all cookies and cookie is also a concept and in this case we have all cookies which is the quantification of this concept so let's explore this abstract mini representations further and see whether they can be more useful than semantic role labeling and typed lambda expressions for example any other representation that there is so what is an AMR abstract meaning representation if a graph that will be routed directed and a cyclic and here you can see on the slide one of my favorite examples the sentence is I beg you to excuse me and in this case this graph will have like nodes and relations between those nodes and nodes will be concepts so in this case we have like two event concepts of begging and excusing and we have to like entity concepts so we have I and you write and although I is expressed twice in the sentence in the form of I and me this is still the same concept it's just that we refer to this concept again using the word me right this means that in the graph we want to have only one note for I write although we have two words one note for you is mentioned also once and two more notes for two events that take place in the in the sentence and then we want to identify the roles the semantic roles and you can see the notation that was used for semantic role labeling and that is that can be found in all of these semantic resources like probe and the one I mentioned so here for the event of bagging I will be the doer and you will be the object upon which whom I am begging right and for the event of excusing you will be the jewel right and I will be the the one who is who has to be excused right and then between bag and excuse we also want to add another relation that says that this is the object this is the thing that I'm begging you for okay okay does it make sense not if it does okay good all right a function words are a metal mitten all together you can see the two never made it to the graph because we don't need it we just need to represent the relation between these concepts and events okay a mark nodes are these nodes as I mentioned can be concepts of this can be separate entities this can be advanced that we taken from prop Bank this can also be special key words because we want to preserve the information about entities so if we identified an entity or an organization we can then create a note for this organization and then keep the name of this organization like separately I'm going to show you a couple of examples to some pros and cons of EMRs so Amar's handles these entity types that I mentioned just also semantic roles also correct France so you've seen this example about I beg you to excuse me so the fact that me refers to AI is a core efference relation right and if we will be talking about like John Smith and then we mentioned job Smith as the man or he or anything like that we will have the same concept for all of these mansions of this person also a more handles modality like obligation because or like likelihood over an event and so on because there are multiple ways to express it in every language like you can say somebody must do something or you can say that somebody is obliged to do something or it is somebody's obligation and so on so there are multiple ways to express modality also polarity meaning whether there's a negation or not and it also supports with Wicca fication because many tasks in natural language processing a based on some database for example like Wikipedia so we would want to do to perform tasks like entity linking right to say that John Smith is this particular John Smith so am i representation allows you to add a specific key that directs you to a wiki wiki link I'll also show an example some sometime later in the slides what Ament handle is all kinds of linguistic information like we lose information about the tense about whether the number of the noun was singular or plural whether it was definite or indefinite and so on all of this information is first of all like practically not feasible to keep an AMR and second of all you usually have this information the syntactic representation so if you need it for your application you can retrieve it from there now about the notation that you've already seen a couple slides before AMR uses penguin notation and this is a very quite old notation that is now reused for AMR purposes it was used for other stuff for just graph representation general and as I mentioned like each node is assigned a variable so we identified concepts and now we want to assign a variable for each concept and usually it's just the first letter of the of the concept is taken if the letter you know appears in another word with the same first letter appears you just add the numbers there so this is just for for practical purposes you don't need to think of this to think of these variables so in this case I beg you to excuse me we have a concept of I so we design a variable I for for I and for me together then for you and you see this representation so the concept of the event of bagging then i and you and then we're begging of if the event of excusing and excuse here we have argument 0 and 1 2 and here we reuse the variables that we already defined before right in this way like this representation can be again can be used to build the same graph that I showed you a couple slides ago so this is like the same information just in a different format this is how corpora are saved in this format like more examples so when we were talking about semantic role labeling we saw that we are looking for a verb in the sentence and then we are looking for semantic roles that this verb has to fulfill in in case of AMR you can not only look for words you can look for nouns adjectives or like multi word expressions that denote this kind of event that denote this frame and there are more resources like prop Bank for example there's a resource that's called frame net where you can find different parts of speech and different phrases you know in within one frame and this can be used to build any Mars example here we have the frame the event of desiring and it can be expressed with words like desires or with a noun the boys desire or with an adjective the boy is Desura soft and so on or multi words expression like has a desire to so the in the meaning representation will be the same for all of these sentences as I mentioned a Mar handles polarity and in this case we just add a separate key to their separate like note too to the graph that is called the relation is called polarity and the note will be like a - this is just a special key word so the soldier was not afraid of dying or not afraid to die or did not fear death in all of these cases we have an event of fearing and this event is negated right the doer of this fearing soldier and what is his fears of event of dying so here we have died and who is going to die soldier then again about modality as I mentioned the boy must not go or it is obligatory that the boy not go here we have the event of obligation and the we don't know who obliges that's why we don't have argument 0 we don't know who is obliged with that's why we don't know have argument one but we know that the action of obligation is going and the going is negated and the actor of going is is boy so this is how to interpret it you must have noticed these numbers like 0 1 or 0 2 this referred to the meaning of the verb so in this case for example goal is used in the second meaning because go in the first meaning is to move towards some direction and go in the second meaning means to leave so these are like two different meanings and that's why there will be they will be in two different frames so having two different sets of semantic rules aim are also can be used for question answering and that's why it has to handle questions for questions there is a separate special key word special concept that is called a mr unknown for example which state borders with Kansas can be interpreted in this case we have an event of ordering we have two entities that are States but we know the name of one state we don't know the name of the different state or if a question is a polar one for example does Texas border with Kansas in this case the unknown part is the polarity we don't know whether it's a minus or it's a plus okay but we know both states and the the names of these states let's see it's a more complex example and then and then discuss how to build a Mars right so a more complex example would be 14,000 people fled their homes at the weekend after tsunami warning was issued the UN said on its website so the man in the main event in this sentence is the same and the organization we have the entity here write an organization whose name is UN said something through its website and we can seek a reference resolution here because we defined we defined the concept organization and we assigned a variable all and we can see that the it was the information was passed through its website and this it's you know when is resulted Amr is a possessive relation to to this oh that was defined earlier so this is what it's where it is and then what the information is about it's about the invent of fleeing and people were fleeing their homes right the quantity of people can be defined as separately in Amr and then we have to add variable modifiers of time so can be like two different arcs with time relation one is during the weekend and another one is after there was a tsunami warning so let's see how we can build a more semantically because they seem pretty complex right a human tennis human just sit down and annotate stuff like that yes a human camp and actually there are a mr banks and this is a little bit outdated because the right yesterday there was a new release of I am are and now we have fifty nine thousand sentences of different news wire and forums data and television transcripts that are annotated for these a as AM are graphs the first corpus of am are graphs was the little prince' like the beloved children's story and it was annotated for a monographs and there's also a lot of experiments on text mining in the bio domain so there appeared the new corpus of 7,000 sentences of bio AMR this is a famous example from the little prince you become forever responsible you become responsible forever for what you have tamed right and this is an AMR representation of of this sentence so we have the the main event is becoming then you are becoming responsible being responsible is also an event it can be expressed in different ways and then we are reusing you for being exposed responsible you're responsible for the thing that you change again we have you here and the extent this is like the most sad thing here I guess so the extent is forever there are a couple of AMR parsing algorithms some of them are more successful some of them are less successful we're going to discuss graph based in transition based algorithms same as in syntactic parsing if anyone has experienced their rule-based parsing for AMR is not very efficient because it's very it's easier to get data to get this information from data than to to write rules and sequence to sequence based approaches haven't shown the good with results yet because I guess that's because we have a very complex data structure what do you need to build an AMR first of all you need parts of speech tagging in syntactic parsing because you need a syntactic representation gives you a lot of information who does what to whom and you can extract this advance from syntactic representation also you need named entity recognition because if there's a named entity we would want to keep it intact and know that this is like one concept and you would need correct resolution in order to resolve these examples when you have I and me and then John mentioned as he and dimension does demand and some something like that so that you don't create multiple concepts for that let's talk let's look at graph based parsing first there's an open source parser that is called jmr that you can use and it's a graph by Forster and it works in two steps the first step would be to go through the sentence and identify concepts this is a sequence labeling task if you've done any like sequence labeling and ever so in this case we would identify Kevin Knight for example as an entity so we don't have to to classify it in any way this is already done by named entity recognition module and you just create a concept out of Kevin Knight then you can classify like as a concept that is an event we know that it's a verb we've seen from the data in our AMR banks that it's usually an event so we can classify it as a separate task we can match it to a two to the most probable meaning in this sentence then we can classify to as a known concept because it's a function word we don't need it and then we have like semantically parse sentences so all of these are classified as different concepts you might have noticed that parse is has this 0 0 that's because it's a verb but it's for example the word parse is not in prob bank right probe Bank only has like 7000 different frames and it was created a couple years ago it doesn't have parts in this meaning so but we can our classifier can define parse as a probable event as a probable event and but we don't have the meaning that's why we just assign 0 0 because we don't have a knowledge base just to map it to so in this case we now we have the concept but we have to build a graph out of this concept with semantic relations between these concepts here's what we can do we can first build a fully connected graph and then we can find the maximum spanning graph out of this fully connected graph how do we do that in a fully connected graph we would using our AMR Bank because we have data we can train on this data we can calculate the probability of each of these each of these arcs right and then using a maximum spanning graph algorithm we're not gonna go through the algorithm here but if you're interested like these are two very useful algorithmic maximum spanning tree in Mexico spine graph depending on what you're building we will build the maximum spanning graph here that will have like the highest score of course the idea of the transition based algorithm like this is abou this would be a different algorithm for a building Amr graphs is that a.m. or graphs look like suspiciously similar to dependency parse trees if you let's align like two two representations and see the similarities right so here's our our sentence I beg you to excuse me and on the top you can see the dependency parse tree this is a syntactic representation and in the bottom you can see AMR this is a semantic representation so we can see that for example there there's the same relation from bag to eye which is here it's a subject is a nominal subject button am i it will be R 0 like of doer right there's also relation from back to you here is an object here it's argument 1 then you know from excuse we have a relation from we have a relation from back to excuse that is the same as here but then we don't have the same relations from excuse as a in in the syntactic parse tree but still there are similarities and the idea is that we can apply a couple of transformations to the syntactic parse tree and get an AMR so there's a see AMR parser which is also an open source parser that you can find online and work with it that transforms a dependency parse tree into an AMR the idea is that we traverse the dependency parse tree and it's each step we analyze the nodes that we have and the the relations that we have and we can train a classifier that will decide whether you need to do one of the following steps one of the following actions right so the actions are actually will be the classes of your classifier and you can get training data again from the AMR Bank Bank because you can parse the same trend you already have a more presentations and you can parse the same ten sentences for the dependency parser and align them and work on create an algorithm that retrieves these steps these transformations for example here we have a police wants to arrest right and in this case the the action will be reentrant because we want to create an arc from arrest to police with the label argument zero because only police are the ones who want and police are also the ones who arrest and there are others things for example you can so this is reentrant an example of relay re-entrance you can also like delete a note if it's a function word because we don't need them in the syntactic parse tree or you can attach a new edge because there was no edge and so on so there are different different steps and different different developments of this of this approach how do we evaluate whether our AMR parser is a good one so this penguin format is very easy to work with format because you can splice it into these triplets and this will be a list of instances a list of concepts that you have in your AMR tree this is the boy wants the girl to believe him and you will also have so these are Triplets of concepts and triplets of relations between concepts so you splice your AMR graph into this representation and you compare it with the one that is the reference representation and then you get the then you can evaluate anything you want you can evaluate the instances separately are separately the semantic relation sell separately or you know anything or everything together or an exact type of relation so any kind of evaluation you want to do this this metric is called snatch which means semantic match okay yeah and if we refer to the algorithms we just discussed the graph base and the transition based one in terms of snatch the graph based one works better than the transition based one because we have like the fully connected graph already so we can it's easier for us to find it but it's more computationally expensive of course because we have to to calculate the whole this fully connected graph in this case the quality is not up to the sky it's only like 70% for the best graphs now for the but for the best parsers now but it's it's a recent development so there's a lot a lot of work to do a lot of room for improvement and the training set is only like 60 thousand sentences as I mentioned and the last section that they have today is an application of EMR like ok so now we can build a Mars from natural language sentences how can we apply this and there has been a lot of attempts to apply it in recent years the most the most development has been done in terms of text summarization you can see there are like four links here to different to the to two different groups that work on text summarization with AMR and they've achieved like really good results I'm gonna show you a couple like just an example to to look at I also know that the company new ins communications uses AMR for intent detection of intent in production and there was a nice shared task on natural language generation this is something that we'll start with as you know we still don't have a good way to do controlled natural language generation like we can use neural networks neural networks models in order to generate tax that is similar to some other tax but what if you want to generate text that has a specific meaning that we that you want to like to express in natural language that we want to paraphrase in natural language like what if you want to to write something to plagiarize on some work right so this is not a very nice example but what if you want to place your eyes some work and paraphrase it in the way that's no plagiarism checker will detect it and so on so how about controlled natural language generation look this is one of the example a Mars from this shared task on natural language generation this one from 2017 and Sami well if we humans look at it and try to interpret it we can see that the main concept here to start is and which means that there will be two events the first event is that country named Bosnia and here you can see wiki fication that I asked that I mentioned earlier so this is the part of wiki URL you can find this this entity and weekend now so our country Bosnia remains probably divided here we have the country mentioned again about some ethical questions and then the second event is violence so there's there's violence happening we don't know who is violence who is violent and we don't know who the violence is targeted at we only have information about frequency location and time that it happens occasionally and somewhere here presumably in Bosnia and during some kind of football matches like major football matches and we also have for these two events we have a time chunk time at verbal mode of temporal it variable modifier that says that this all happens following the war from 2000 from 1992 and 1995 and these are the this is the reference so following the 1992 1995 war Bosnia remains ethnically divided and violence during major football matches occasionally occurs here and these are the results of to winning systems the second one is by the way Cambridge not far from here the first system generated from this am are following the the war Bosnia has remained an ethnic divide which is also very nice like nice paraphrase of the previous one but then it kind of screwed up because it says and the major football matches occasionally violence in here so we see that it was expecting a verb but found it now and didn't find a word verb so it screwed up a little bit the second one is is also not not bad but we can see some gibberish in this case too so we can see there's a lot of way to work but there's a way but this was a very complicated example to how does this how do these natural language generation systems work the idea is that we can extract rules from Baba Amr Banks and then we can use these rules in like statistical machine translation style so we can find the best transduction the best scoring transduction and build the sentence let me show you a couple of examples of these rules so for example we can find all sub graphs like this so we can find right you know with arguments here an argument 1 and here we have something some concepts so which are interpreted in natural language in our a.m. our banks as X 1 right X 2 or we can generalize them and just put the parts of speech here you know that's also a good rule but it's a general rules the rules don't have to be super specific or if we have the same concept the same event of writing but we can have argument 0 and destination the rules can look like this like X 1 rights to the X 2 or X 1 takes a ride or X 1 pedals 2 and so on so there are many a different interpretation so we can collect all kinds of rules like this and we can look for best scoring transduction and we don't have to look for one we can look for multiple ones and output even a couple of sentences that will that will represent the meaning of that is in the AMR graph like this now the question is why I am telling you this now we learned to parse sentences into graphs and parse graphs into sentences right so how can we use this knowledge why did we do that so we did that because these approaches are used in that selective text summarization there are two types of text summarization in our P one is called extracting it is when you take attacks you pick the most important sentences from this text and you glue them into a new text but this is not very exciting because the new text gives you some information but it's not very coherent right there is no good solution now for obstructive text summarization a lot of research is going on around neural to attractive text summarization but neural networks do not generate longer text so they can generate like two or three sentences that will give you a summary of the text but not like a paragraph and we usually want to summarize longer tax like why would we need to summarize summarize three paragraphs into two sentences so the idea here is that we can take sentences of our longer text of our document parse these sentences into Amr graphs then connect all of these graphs find the summary graph and then generate a sentence out of the summary graph for example here we have two sentences I saw John's dog which was running in the garden and the dog was chasing the cat so we can parse each of these sentences into two am our grass then we can connect two graphs I will show you how and then we can find a summary graph that the later can be used to generate a summary of this text that will be Joe's dog was chasing a cat in the garden and it scales the Lord because it doesn't matter how how large this graph is you know as long as you have a good algorithm to find the summary graph and you can control the the lengths of a summary of course so we know how to build EMR graphs from the sentences and how to generate a sentence out of a graph the question is how to build the summary graph and first of all we need to build the document level Amr here's what we do here we have two different graphs so I see John's dog which was running in the garden and the dog was changed in the cat in order to merge these two graphs we have to identify the same sorry the same context concept so in this case dog is mentioned in in both sentences but this is the same concept and preference resolution helps us resolve that because there are application that work across sentences so we merge these two notes then we also create any separate stub note that is called route in order to connect all graphs in the document because some craftsmen may not have concept that they share with other graphs so we need to connect everything together and then we also do additional propagation so if we have two concepts that are not directly related like dog run garden we'll just create another additional concept in order to create more space for searching for this summary graph after that we use our we can use data right so in order to Train anything we need data and there are multiple corpora of text and their summaries we can parse text and parse their summaries into a mrs and use that as data right and we can train a classifier to predict the most meaningful subgraph how do we do that we have to predict the most meaningful notes concepts in our graph in our new document graph and we have to predict the most important edges and after that we also have to validate that what we got is a valid graph because if we predicted some edge but and it connects to a node that was not predicted as important then we don't need this this edge yep so I feel I hope that you now feel that you know am I like near here and I got a added some useful references so these are different papers that that I was mentioning on the way but another slide is even more important these are useful resources these are actually tools that are open-source tools for that you can use to to work with Amr this is a link to a mr banks here you can find all o corpora that are with raw sentences and AMR representations then parser Python person for Penman format then these parts these parts those open-source parses the dimensions jmr and see a mark which a graph based and transition based and a good tutorial on summarization with a mark okay thank you very much I thank you for your attention and [Applause] [Music] you
Info
Channel: Open Data Science
Views: 2,305
Rating: undefined out of 5
Keywords: ODSC, NLP, DataScience, AI
Id: uCZ9nAe76Ss
Channel Id: undefined
Length: 44min 19sec (2659 seconds)
Published: Tue Dec 17 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.