concept information in category nlp

This is an excerpt from Manning's book Real-World Natural Language Processing.
Where there is text, there is NLP. Many tech companies use NLP to draw information from a large amount of text. Typical NLP applications include machine translation, grammatical error correction, search engines, and dialog systems.
<s>and its ability to make decisions on the basis of its own. " </s>The government has taken no decisions on that matter, " Mr Hockey said. </s>A lot of the information is very sensitive. </s>The new research and information on the Australian economy, which is what we're going to get from people, and the information that we are going to be looking at, we're going to be able to provide and we 'll take it forward. </s>I'm not trying to make sure we're not

This is an excerpt from Manning's book Getting Started with Natural Language Processing.
Let’s start with a very typical scenario: you are searching for all work documents related to a particular event or product, say everything that mentions management meetings. Or, perhaps you are searching for the information on the Web – for instance, you decided to get some help to solve the scenario above from the Internet.
Case 2: You have a collection of relevant documents and you need to extract particular types of information to fill in a database. For instance, imagine you work in an insurance company and you have a collection of various companies’ profiles. These profiles contain all the essential information about each company: e.g., the size of the company, the type of business it is involved in, its revenue and so on. Many of these factors are critical for determining a suitable insurance policy, so rather than considering the companies one by one you might want to extract these facts from the profiles and put them in a single database. Or, imagine you work in a human resources division of a company that receives dozens of applications from potential candidates on a daily basis. Again, the types of information that your company would be interested in are easy to define in advance: you need to know about candidate’s education, previous work experience and core skills. Wouldn’t it be helpful if you could extract these bits of information automatically and put them in a single database? Information extraction in this case would help you save time on manually looking through various candidates’ CVs.
Databases are one way to structure information: in the candidates’ CVs case you need to fill in specific information fields like “education”, “work experience” or “skills” with the details extracted from CVs. One aspect of such documents as CVs and companies’ portfolios that may help you in this task is that they typically follow a particular format: a typical CV would contain a section explicitly called “Education”. In the simplest case, it should be possible to automatically identify relevant sections like “Education” and extract the information from such sections in a CV – for instance, everything related to one’s studies. Figure 4.3 visualizes this idea:
Figure 4.3 CVs are an example of semi-structured documents: you may be able to identify where relevant information is located using keywords
![]()
The problem is, it is not always the case that all documents of the same type are structured in exactly the same way or even contain the same amount of information. To give you one example, imagine you undertook a project dealing with extraction of information about all famous personalities who have a Wikipedia page. A nice fact about Wikipedia is that it contains “infoboxes”: an “infobox” is a fixed-format table that you could see in the upper right corner of a Wikipedia page that summarizes main facts about the subject of this page. This is a good start for your project: infoboxes for personalities typically contain their names, birth places, dates of birth, reasons they are famous for, and so on. This is an example of semi-structured information: infoboxes specify the names of the information fields, e.g. “Born” or “Citizenship”. However, here is the tricky bit: even though the information is structured it is not always structured in the same way. Moreover, even the field with the same name might provide you with a different range of information. Figure 4.4 shows an example comparing bits of just two infoboxes – those for Albert Einstein[32] and Barack Obama:[33]
Figure 4.4 Information Extraction from Wikipedia infoboxes on two personalities
![]()
For space reasons, these are not complete infoboxes: Albert Einstein’s infobox contains additional information about his academic work, and Barack Obama’s provides more details about his political career. We may expect to see such differences: after all, Albert Einstein was not involved in politics, while Barack Obama is not an academic. However, comparing even the basic information fields, we can see that the format used for the two personalities differs: “Born” field contains the name given at birth to Barack Obama, but for Albert Einstein this information is missing; Albert Einstein’s entry lists the details of his citizenship, but Barack Obama’s doesn’t, and so on. So if you were to extract this information automatically, some fields in your database would end up being empty. In addition, even the fields that provide the same type of information sometimes use different formats for the same thing: note the different date format used in “Date of birth” and the differences in “Residence” format – list of countries for Albert Einstein vs. “Town (State)” for Barack Obama. All these differences are hard to resolve without applying further NLP techniques and allowing more flexibility in the extraction process.
Listing 3 Code to extract information about the other participant of a meeting meetings = [('Boris Johnson', 'meets with', 'the Queen'), ('Donald Trump', 'meets with', 'his cabinet'), ('administration', 'meets with', 'tech giants'), ('the Queen', 'meets with', 'the Prime Minister'), ('Donald Trump', 'meets with', 'Finnish President')] #A query = [p2 for (p1, act, p2) in meetings if p1=='the Queen'] query += [p1 for (p1, act, p2) in meetings if p2=='the Queen'] #B print(query) #C

This is an excerpt from Manning's book Natural Language Processing in Action: Understanding, analyzing, and generating text with Python.
Natural languages are different from computer programming languages. They aren’t intended to be translated into a finite set of mathematical operations, like programming languages are. Natural languages are what humans use to share information with each other. We don’t use programming languages to tell each other about our day or to give directions to the grocery store. A computer program written with a programming language tells a machine exactly what to do. But there are no compilers or interpreters for natural languages such as English and French.
In LSTMs, the rules that govern the information stored in the state (memory) are trained neural nets themselves—therein lies the magic. They can be trained to learn what to remember, while at the same time the rest of the recurrent net learns to predict the target label! With the introduction of a memory and state, you can begin to learn dependencies that stretch not just one or two tokens away, but across the entirety of each data sample. With those long-term dependencies in hand, you can start to see beyond the words themselves and into something deeper about language.
So let’s take a closer look at one of these cells. Instead of being a series of weights on the input and an activation function on those weights, each cell is now somewhat more complicated. As before, the input to the layer (or cell) is a combination of the input sample and output from the previous time step. As information flows into the cell instead of a vector of weights, it’s now greeted by three gates: a forget gate, an input/candidate gate, and an output gate (see figure 9.3).
Each of these gates is a feed forward network layer composed of a series of weights that the network will learn, plus an activation function. Technically one of the gates is composed of two feed forward paths, so there will be four sets of weights to learn in this layer. The weights and activations will aim to allow information to flow through the cell in different amounts, all the way through to the cell’s state (or memory).
Remembering information with memory units enables more accurate and general models of the sequence. It’s important to forget information that is no longer relevant.