Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

A Question Answering System Based On Conceptual Graph Formalism

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

A Question Answering System based on Conceptual Graph Formalism

Wael Salloum1
1:
Faculty of Applied Sciences, University of Kalamoon, UOK, Damascus, Syria
edu@wsalloum.com

Abstract—This paper proposes a new text-based question For each question type, we present some formulas by
answering system. It models knowledge in documents and which the CG representations of the question are
questions with conceptual graph formalism (CGF). To generated.
prepare knowledge to be modeled, natural language Section 2 describes the knowledge acquisition phase
processing is applied to the text using OpenNLP, and then where the documents are parsed and their knowledge is
syntactic and semantic information is realized using VerbNet represented. Section 3 explains how different types of
and WordNet. We handle different types of questions, questions are constructed and represented as CGs, and then
especially questions constructed with wh- pronouns, and how they are compared to documents’ CGs in section 4.
questions constructed with “how”, and we propose a model
Finally, section 5 concludes and proposes further research.
to represent them in CGF so that their target is realized and
marked. Each question’s type has different conceptual graph 2. KNOWLEDGE ACQUISITION (KA)
(CG) representations; thus, for each question, many CGs are
generated using formulas. Some of these formulas are 2.1. Construe text
introduced here. The projection operator is used to compare
a question’s CG to a sentence’s CG, and then the exact This stage parses the text and builds its linguistic
answer is extracted from the part of the sentence’s CG that structure. Firstly, Natural Language Processing algorithms
has been projected under the question target’s concept. will be performed on each sentence to build a syntax tree.
We utilize an open source toolkit which is OpenNLP to do
Keywords-Question Answering; Knowledge Representation; that. Secondly, the sentence pattern will be identified.
Conceptual Graphs; Natural Language Processing; WordNet For example, let’s take the sentence: “The human liver
secretes the bile.” The resulting syntax tree of this sentence
from OpenNLP is shown in fig. 1. The pattern of the
1. INTRODUCTION syntax tree it is NP-VP-NP (Noun Phrase - Verb Phrase -
Web search engines provide only directions on the web Noun Phrase). The system identifies the main verb of this
and are insufficient for people who seek knowledge. sentence “secrete”, and then gets all VerbNet classes that
Therefore, a search engine will never satisfy the needs of a match it. Then, it will examine all the semantic frames
Knowledge Seeker (KS) no matter how huge is the associated with each class to find the best match of the
document base (the Web for example). KSs need only the pattern of the syntax tree. In our case it will be “NP:Agent-
answer to their questions no more and no less, not 10 VP-NP:Patient”. That means, the first NP is the subject of
millions web pages that they must search in them again the verb, and the next NP is the object of the verb. We call
manually to find out the answer, and they don’t care if the this best match the sentence pattern.
search engine boasts with a response time of 0.02 seconds. To alleviate the negative effect of paraphrasing
KSs need a question answering system that consolidates discussed in [2], [5] and [6], the system preprocesses the
our slogan “Take your time, and give me nothing but the text before parsing it with OpenNLP by replacing certain
answer”. phrases with their synonyms (words or phrases) from a list.
In this paper, we propose a text-based question For example, replacing “X gave birth to Y” with “X bore
answering system that acquires its knowledge from reliable Y”, because in the first phrase the object will be birth not
text materials, and answers question semantically. It Y. This list is built manually by linguists and domain
returns just the answer not the documents. Our system experts.
represents knowledge found in a document in the The system must post-process the syntax tree resulted
conceptual graph formalism (CGF). It 1) splits document from OpenNLP so that the sentence pattern suits the next
into sentences; 2) parses sentences via natural language stage “Construct”. The post-processing simplifies
processing (NLP) techniques; 3) maps words in sentences compound and complex sentences to become simple ones,
to concepts via WordNet ontology; 4) uses the syntactical and converts passive voice sentences to active voice ones.
relations between words to construct conceptual relations Thus the “Construe” steps are to 1) pre-process text; 2)
between concepts so that each sentence is represented with parse text with OpenNLP; 3) post-process syntax tree; and
a conceptual graph (CG); 5) uses sentence connectors (e.g. 4) find the best frame that matches the sentence pattern.
“therefore”) between sentences, if found, to construct S
conceptual relations between their CGs; and 6) stores
resulting CGs in a database.
Our system answers a question by 1) representing its
NP VP NP
knowledge as a CG, actually it generates many CGs to the
question according to its type; 2) projecting question CGs
on documents’ CGs via the projection operator; 3)
extracting answers from the projected sentences; and 4) DT ADJ NN VBZ DT NN
comparing, combining, ranking and presenting the answers The human liver secretes the bile.
to the user. In this paper we focus on questions constructed Figure 1. Example of a syntax tree
with wh- pronouns and the ones constructed with “how”.
2.2. Construct Conceptual Graphs
In this KA’s stage, the system realizes the meaning of The knowledge is represented in a form that suits the
the sentence by building the semantic model of the question answering purpose of the system. Therefore,
knowledge in its text based on its syntax recognized in the many concepts and relations are constructed and
previous stage. manipulated to increase the efficiency of question
The first step is to convert the words found in the answering. For such concepts, the system recognizes
sentence into concepts using WordNet ontology which named entities (NEs) [3] such as Person, Organization,
maps each word with one or more concepts. To find out Location, Date/Time, and Number. If a number (figure or
which concept is meant, the system disambiguates these text) is associated with a unit ($, mph, etc.), then the
words depending on the context of the sentence. One resulting concept type will be figured out from the unit and
approach to carry out word-sense disambiguation (WSD) the concept referent will be the number.
is Domain Driven Disambiguation (DDD) which considers 2.3. Connect sentences
each word to be ambiguous when isolated from the text,
but when it is found within a context, it will belong to the The system uses words and phrases that connect
domain of that context (i.e. the domain of all the words in sentences (sentence connectors) to form a relation between
that context), given that a context will rarely belong to the two CGs of these sentences. For example, words and
more than one domain with the same degree. We use phrases such as because, therefore, thus, hence,
WordNet Domains, an extension of WordNet knowledge consequently, as a result, for that reason, so, then are used
base, which assigns each concept with a certain domain. to form the “Implicate” relation between two CGs. Many
The second step is to build the relations between these other relations are constructed to facilitate sentence
concepts based on the syntax tree and sentence pattern. We comparing and contrasting in order to summarize answers.
In addition, the “Reason” relation, which answers “Why”
choose the Conceptual Graph Formalism (CGF)
introduced in [7] to represent knowledge in our system. questions, is constructed when one sentence contains “to
CG is defined as a directed, bipartite graph; it contains two <verb>” and the other one is in the past tense (stored in
sets of vertices and a set of edges: cg = (C, R, E). The first CG’s metadata). However, if the other sentence is in the
set of vertices (C) contains the concepts while the second present tense, a “HowTo” relation is constructed instead.
set of vertices (R) contains the relations between these For example, the sentence “Sam killed his wife to get the
concepts. Each edge of E connects a concept from C with a insurance money.” is represented as the following CG:
relation form R. Each concept vertex contains a Type, { [Kill]-
which specifies the class of the entity represented by the (Agnt) -> [Person: Sam]
concept, and a Referent, which identifies an instance of the (Ptnt) -> [Wife: *] <- (Attr) <- [Person: Sam] }
concept’s type. The graphical representation in fig. 2 -> (Reason) ->
illustrates this formalism. { [Get]-
The system determines the structure of the CG based (Agnt) -> [Person: Sam]
on the sentence pattern and the syntax tree. Metadata about (Ptnt) -> [Money] -> (Attr) -> [Insurance] }
the represented knowledge must be annotated, which In contrast, the sentence “To get help, press F1.” is
depicts many attributes of the CG such as the tense of the represented as the following CG:
sentence, and its domain (medical, technology, etc.). { [Get]-
For example, we can represent the knowledge in the (Agnt) -> [Person: *]
sentence: “Mark Twain wrote Tom Sawyer” as in the CG (Ptnt) -> [Help] }
in fig. 3. At first, we obtain the concepts of the -> (HowTo) ->
words/phrases of the sentence from WordNet: “Author” { [Press]-
with a referent Mark Twain, “Write”, and “Novel” with a (Agnt) -> [Person: *]
referent Tom Sawyer. Then we will construct the CG (Ptnt) -> [Computer-Key: F1] }
according to the sentence pattern “NP:Agent-VP- 3. QUESTION CONSTRUCTION
NP:Patient”: the verb is “Write”, its subject is “Author”
(connected be “Agent” relation), and its object is “Novel” To represent the question, first, the system construes
(connected by “Patient” relation). The tense of the the question’s sentence, and then constructs the knowledge
sentence is stored in the metadata along with the domain in the question’s sentence in the same knowledge
“Literature” extracted from WordNet Domains. We also representation form of the acquired knowledge: a
can represent this CG in a simplified linear form as: conceptual graph and its metadata (we denote it as QSCG).
[Write]- However, the CG representation of a question differs from
(Agnt) -> [Author: Mark Twain] the CG representation of a document sentence in that the
(Ptnt) -> [Novel: Tom Sawyer] target of the question must be identified and marked, and
in that, for each question, many CG representations will be
generated to alleviate the negative effect of paraphrasing
problem. CG generation subjects to the type of the
question where each type is associated with a set of
Figure 2. Conceptual Graph Formalism
formulas to generate question CGs. These formulas are
built manually and each one has a weight. We present
some of them in the following. Finally, the domains of the
question are extracted from WordNet Domains and stored
in CG’s metadata in order to narrow the search range.
Figure 3. Example of a Conceptual Graph
3.1. The Whx Model If the system can't find a match for “Attr”, it will
This model represents knowledge in wh-questions, counts all the answers for X, and then presents the answer
which are constructed with who, whom, what, which, when, as this: “I know n Xs: X1, X2, …, and Xn.”, where n is the
where, why, and whose. It identifies the question’s target count of Xs.
according to the wh- pronoun used in the question. The Sometimes “how much” questions are not followed
following sample formulas give a good explanation: with a noun. In this case, CG representation is:
Who, Whom Î [Person: *]? <-(rel)<- [QSCG] How much Î [Number: *]? <-(rel)<- [QSCG]
What, Which Î [Thing: *]? <-(rel)<- [QSCG] 2) “How” followed by an adjective:
When Î [Date: *]? <-(Date)<- [QSCG] A question that starts with “how” followed by an
Where Î [Place: *]? <-(rel)<- [QSCG] adjective is asking for the amount of an attribute of a
Whose Î [Thing: *]? <-(Agnt)<- [Possess] <- [QSCG] named entity (NE) found in the question. We first identify
Î [Thing: *]? <-(Attr)<- [QSCG] this NE, and then discover its attribute that matches the
Why Î [CG]? <- (Reason)<- [QSCG] adjective. We maintain a list that contains adjectives
Î [CG]? ->(Implicate)-> [QSCG] assigned to nouns and units. Table 1 contains a sample.
We mean by rel any relation that can be found;
sometimes it can be identified from the question’s context. TABLE I. HOW ADJECTIVES’ LIST
Concepts followed by a question mark “?” are the target of Adjectives Nouns Units
the question, and will be a potential answer when found. Tall/short Height/Length meter, inch…
QSCG is the CG of the question’s sentence. Long Distance/Length meter, mile…
In the following we present some questions and their Interval year, hour…
knowledge representation: Old Age year, hour…
Far (away) Distance meter, inch…
- Who invented the light bulb? Wide Space/Area acre, square foot…
[Invent]- Heavy Weight gram, pound…
(Agnt) -> [Person: *] ? Hot Temperature celsius, fahrenheit…
(Ptnt) -> [Light-Bulb] Fast/slow Speed mph, kmph…
- Who was assassinated on November 22, 1963, in Dallas? Often Frequency times…
[Assassinate]- Some formulas of this question’s type are:
(Agnt) -> [Person: *] [QSCG]->(rel)->[NE]->(Attr)->[noun]->(is)->[Number:*]?
(Ptnt) -> [Person: *] ? [NE] <-(Agnt)<- [verb] ->(Ptnt)-> [Number:*]?
(Date) -> [Date: 11/22/1963] [QSCG] ->(rel)-> [Number:*]?
(Location) -> [City: Dallas] We use the second formula when a verb verb can be
- What is the gland that regulates sugar? Or, derived from the Noun. The relation rel means any
Which gland regulates sugar? possible relation that can be found. The third formula is the
[Regulate]- worst case. Some Examples of applying these formulas are:
(Agnt) -> [Gland: *] ? - How heavy is the World Cup?
(Ptnt) -> [Sugar] [World Cup]->(Attr)->[Weight]->(is)->[Number: *]?
- Where was Edison born? [World Cup]<-(Agnt)<-[weigh]->(Ptnt)->[Number: *]?
[Bear]- - How fast can a Corvette go? Or, How fast is a Corvette?
(Agnt) -> [Person: *] [Corvette] ->(Attr)-> [Speed] ->(is)-> [Number: *]?
(Ptnt) -> [Person: Thomas Edison] [Corvette] <-(Agnt)<- [go] ->(Ptnt)-> [Number: *]?
(Location) -> [Place: *] ? The system avoids the silly answers such as “very”, “a
- What did Thomas Edison invented and when? little bit” and “many”. Simply, it excludes adverbs from
[Invent]- the answers’ list when it contains a number.
(Agnt) -> [Person: Thomas Edison] 3) “How” followed with an auxiliary verb in the past:
(Ptnt) -> [Thing: *] ? This type asks for an event happened in the past. The
(Date) -> [Date: *] ? target is about “in what manner or way”; “by what means
Although the named entity recognition has simplified or process”; or “for what reason” that event occurred.
the answering of wh-questions (except why) given the Some formulas that generate Question’s CGs are:
previous simple formulas, there are many special cases that • [QSCG] ->(Instrument)->[Thing/CG: *]?
cannot be answered without the creation of a reasonably- The “Instrument” relation is created in the KA phase
large set of formulas associated with each question type. when an instrument is identified by propositions such as by
Section 5 explains how they can be created automatically. and with or words and phrases such as using and by means
3.2. Questions formed by “How” of. For example, “You can buy it with a credit card”, “He
created this document using MS-Word”.
“How” questions are divided into the following types: • [CG]? ->(Reason)->[ QSCG]
1) “How many/much” In this relation, the target CG answers a why question
A question that starts with “how many/much” is with certainty, and the source CG answers a how question
usually followed by a noun X where the question’s target is with uncertainty (note that in the following example).
the amount of X. “How many” is used for countable nouns E.g.: “To get the insurance money, he killed his wife.”
(days) while “how much” is used for uncountable nouns Question: Why did he kill his wife?
(money). Answer: To get the insurance money.
The CG representation of the two types is: Question: How did he get the insurance money?
[Number: *]?<-(Attr)<-[ X]<-(rel) <- [QSCG] Answer: He killed his wife.
• [CG]? ->(Implicate)-> [QSCG] organizes sugar?” the system projects the question’s CG in
In this case, “how” and “why” questions are the same. the sentence’s CG and extract the exact answer “Pancreas”
E.g.: “He got the insurance money because his wife died.” (a subtype of “Gland”) as illustrated in fig. 4. Then it
Question: Why did he get the insurance money? calculates the relevance of the answer based on many
Answer: Because his wife died. factors such as the weight of the formula by which the
Question: How did he get the insurance money? question’s CG was generated and the similarity between
Answer: His wife died. the two CGs. Then the system compares all the answers to
4) “How” followed with an auxiliary verb in present: eliminate replication and solve contradiction. Finally, it
The target of this type is a process or a fact. When the displays the final answer.
target is a process, the answer can be an article or a section
in an article if its title matches the question. So the system 5. CONCLUSIONS AND FURTHER WORK
must search in titles’ and captions’ CGs (the metadata of We have introduced a model to represent knowledge in
the CG specify that if it is a title or a caption). text documents and questions as conceptual graphs, and
On the other hand, when the target is a fact, the CG then find the answers of these questions by projecting the
representations will be similar to the previous form and the question’s CGs on the documents’ CGs, finally, extracting
system will generate CG representations according to the the answer from the projection results. For each question
same formulas. However, “Reason” relation is replaced type, we provided some sample formulas that generate
with “HowTo” relation, for example, for the sentence “To question’s CGs for questions of that type. A considerable
get help, press F1.”, questions as “How to get help?” and list of formulas can be learned by training the system as
“How can I get help?” will be answered with “Press F1.”. follows: 1) We can obtain a large set of question/answer
pairs (e.g. TREC QA Track); 2) For each pair, the system
3.3. Other Questions searches for a string of both question and its answer in a
1) True/False Questions large, well-written corpus (such as Wikipedia); 3) When a
The CG of a question of this type is constructed as for question/answer pair is found in a sentence, the CG of this
a sentence and projected on all CGs stored in the database. sentence will be constructed; 4) A new formula will be
2) Question formed with Show, Discribe, Name, etc. learned by generalizing this CG; 5) The weight of this
This form of questions can be manipulated in a similar formula can be calculated as the frequency of its
way to the previous cases. appearance; and 6) Formulas with low weights (below a
certain threshold) will be dropped from the model.
4. QUESTION ANSWERING Furthermore, research is needed on the summarization
When a user asks the system a question, the system of the answers and comparing and contrasting them in
builds its CGs as discussed previously, and then compares order to present one final answer if possible.
each question’s CG to each sentence’s CG in the same Summarization can be done by defining a model for
domains of the question by performing the projection joining answer’s CGs such as reassembling complex and
operator. Then it extracts a potential answer (PA) from compound sentences from simple sentences and combining
each successful projection, where PA is the part of the sentences of similar meaning. Comparing and contrasting
sentence’s CG projected under the question’s target. PA can be achieved by utilizing relations constructed from
can be a CG (denoted as CGpa) or a single concept node sentence connectors such as however and in contrast for
(denoted as [Cpa]). In the first case, the exact answer will contrasting, and besides and furthermore for comparing.
be the sentence reconstructed from CGpa. In the second
case where [Cpa] is a restriction of the question’s target
(which is an existential concept denoted as [Cqt: *]), the REFERENCES
exact answer will be the type Cpa if it is a subtype of Cqt [1] J. F. Sowa, “Knowledge Representation: Logical, Philosophical,
and Computational Foundations,” Brooks/Cole Publishing Co.,
and/or it will be the referent r if Cpa is an individual Pacific Grove, CA, 2000.
concept [Cpa: r], otherwise ([Cpa]=[Cqt: *]) it will be
[2] D. Mollá and M. Van Zaanen, “Learning of Graph Rules for
excluded from the answers. For example, the question Question Answering,” Proc. ALTW05, Sydney, December 2005,
“Who wrote Tom Sawyer?” seeks the referent “Mark 2005.
Twain” not the type “Author”. Finally, the system filters, [3] M. Van Zaanen and D. Mollá, “A Named Entity Recogniser for
summarizes, ranks and presents the answers to the user. Question Answering,” Proceedings PACLING 2007, 8 pages,
The projection operator is discussed in many papers as Melbourne, 2007.
[1, 4, 8] and different algorithms are proposed. We will not [4] K. Willett and G. Lendaris, "Projection in conceptual graphs using
discuss it here. We embrace the algorithm proposed in [8]. neural networks," 1995, pp. 120+. [Online]. Available:
http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=485025
[5] F. R. James, J. Dowdall, K. Kaljur, M. Hess, and D. Mollá,
“Exploiting Paraphrases in a Question Answering System,” In Proc.
Workshop in Paraphrasing at ACL2003, 2003.
[6] F. D. France, F. Yvon and O. Collin, “Learning Paraphrases to
Improve a Question-Answering System,” In Proceedings of the
10th Conference of EACL Workshop Natural Language Processing
Figure 4. Example of projection of a question and a sentence. The for Question-Answering, 2003.
“Gland” is the question’s target. Bidirectional arrows represent a [7] J. F. Sowa, “Conceptual structures: information processing in mind
projection on concepts computed using WordNet and VerbNet. and machine,” Boston, MA, USA: Addison-Wesley Longman
Publishing Co., Inc., 1984.
For example, given the sentence “Pancreas regulates [8] G. Amati and I. Ounis, "Conceptual graphs and first order logic,"
carbohydrates.” and the question “What is the gland that The Computer Journal, vol. 43, no. 1, pp. 1-12, January 2000.

You might also like