CHAPTER 4 ARTICLE 1 : A LANGUAGE ADAPTIVE METHOD FOR QUESTION
4.3 System Overview
4.3.2 Entity Extraction
As previously mentioned, the original AMAL project focused on Simple Questions, limited to at most one entity and one property. For example, a simple question is Who is the father
of Barack Obama?, where ’Barack Obama’ is the entity and ’father of’ is the property. To
extract the entity from the question, we first try to match the words (or a combination of these words) to existing DBpedia entities. Given that noun groups can contain many more elements than just the entity, such as adjectives or determinants, we start by removing the question keywords and consider the remaining string as the longest possible entity. We then generate all possible substrings by recursively tokenizing the output. All generated combinations are then appended to the dbr: prefix (see Table 4.1), e.g. dbr:Barack_Obama and are ran against
Table 4.2 Keywords for question classification
Contains Example
Boolean question
Does Does Toronto have a hockey team?
Do Do hockey games half halftime?
Did Did Ovechkin play for Montreal?
Was Was Los Angeles the 2014 Stanley Cup winner? Is Is Corey Crawford Blackhawks’ goalie?
Date question
When When was the Operation Overlord planned? What time What time is the NHL draft?
What date What date is mother’s day?
Give me the date Give me the date of the FIFA 2018 final? Birthdate What is the birthdate of Wayne Gretzky?
Location question
Where Where is the Westminster Palace? In what country/city In what country is the Eiffel Tower? (Birth)place What is Barack Obama’s birthplace? In which In which state is Washington DC in? the location of What was the location of Desert Storm?
Table 4.3 Number and Aggregation question classification
Contains Example
How many How many countries were
involved in World War 2?
Count Count the TV shows whose
network company is based in New York? List the [..] List the categories of the animal kingdom.
Sum the things Sum the things that are produced by US companies?
the most/the least What is the most important worship place of Bogumilus?
first/last What was the last movie with Alec Guinness?
[ADJ]-est
(biggest, oldest, tallest, etc.)
Name the biggest city
where 1951 Asian Games are hosted? Who is the tallest player in the NBA?
the DBpedia database to find as many valid (i.e. that exist in DBpedia) candidate entities as possible. For example, Who is the queen of England? generates the following substrings after removing the question indicator (Who is, a Resource question indicator): queen of England,
queen, England, queen of, of England. Out of those, only the first 3 are kept as valid entities
since queen of and of England are not DBpedia entities. The selected entities are then sorted by length.
In order to increase the set of considered entities, we add variations of the identified nouns using normalization and stemming. For example, the noun queen can be transformed to extract the entities Queens or Queen. If no entities are found using this method, we use the DBpedia Spotlight [39] tool. Spotlight is a tool for entity detection in texts and its performance is limited when applied to single phrases so it is only used as a backup method.
Once all the possible candidate entities have been extracted, we use multiple criteria, such as the length of the entity’s string, the number of modifications needed to find it in DBpedia and whether we had to translate it, to determine their likelihood of being the right entity. For example, every modification through normalization and stemming reduces the likelihood of the entity to be chosen. In our previous example, since Queens requires 2 modifications (pluralization and capitalization), it is less likely to be selected as the correct entity by the entity extractor. The formula we currently use to combine these factors is the following, where e is the entity string:
length(e) − T × length(e)2 + 2 × U × nsp(e) - P
where:
nsp(e) is the number of spaces in e
P is the number of characters added/removed to add/remove pluralization T = 1 if e has been translated, 0 otherwise
U = 1 if e has not been capitalized, 0 otherwise
According to the formula, the score is penalized by half the length of the entity string if we used a translation. This only applies for languages other than English since the translation step is entirely skipped when analyzing an English query. Also, the more words it contains (a word is delimited by the use of spaces) the higher the score will be, if it has not been capitalized. For example, In which city is the Palace of Westminster in? we can extract
Palace of Westminster and Westminster. However, using the above formula, Westminster
more likely that the correct entity is Palace of Westminster.
During the entity extraction phase, there is very often the issue of ambiguity when deciding which resource in the knowledge base we are looking for. For example, Victoria can refer to: Person, Ship, City, Lake, etc. To determine which resource to use to answer the query, LAMA has a multi-step approach which relies not only on candidate entities but also on properties, as explained in section 4.3.2 and 4.3.3:
1. For every candidate entity being a disambiguation (dbr:Victora,dbr:Victoria_(name),
dbr:Victoria_(ship), dbr:Queen_Victoria_(ship), etc.) for the word Victoria, we ex-
tract possible disambiguation entities following the disambiguation link provided in DBpedia and store them in a vector V where the first element is the original entity (i.e.
dbr:Victoria).
2. For each entity in the vector V, we generate a SPARQL query that involves the entity and the properties extracted by the Property Extractor (see section 4.3.3). We keep only the entities whose queries return non-empty answers for an ASK SPARQL query looking for an existing link between the entity and the property.
3. In the case of multiple entities having the same property in their DBpedia description, we find the intersection between the entity’s label and the original query’s string repre- sentations (character per character) and compute its length (See the example below). Results are then sorted by a distance factor (from 0 to 1) based on the ratio of the intersection’s value and the entity length using the following representation:
distance vector = entity|intersection set|0s label length
This can be best illustrated with an example using the following question taken from the SQA training set : Ship Victoria belongs to whom? The property in the query is: dbo:owner (representing the expression belongs to) but there are 2 candidate entities: dbr:Ship and
dbr:Victoria and as already mentioned, dbr:Victoria has several possible disambiguations
(more than a 100). Most of those can be eliminated as they are not linked to any other entity by the dbo:owner property. However, some resources do have the property and can be valid possibilities, most notably: Victoria_(ship) and Queen_Victoria_(ship) where both entities have a dbo:owner and are both ships. In this case, calculating the intersection’s length between those entities and the original question’s string, we get an intersection length of 12 (i.e. there are 12 letters shared between the two strings) for Victoria_(ship) and 13 for Queen_Victoria_(ship). However, the distance factor is 12/12 and 13/17 respectively.
Using those metrics, we return a list of ranked entities where Victoria_(ship) is the top entity.