Weighting search criteria based on similarities to an ingested corpus in a question and answer (QA) system
A mechanism is provided, in a data processing system comprising a processor and a memory configured to implement a question and answer (QA) system, for weighting search criteria based on similarities to an ingested corpus in the QA system. A set of question characteristics found in a received input question are compared to a set of data characteristics respectively describing data in each corpus of a corpora. For each question characteristic in the set of found question characteristics, a first weight is assigned to the corpus within which data associated with the data characteristic resides in response to the question characteristic being more related to a data characteristic; otherwise a second weight is assigned, where the first weight is greater than the second weight. A selective search is then performed for an answer to the received input question in one or more corpora with a higher weighting.
1. A computer program product comprising a computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to:
parse a received input question having a set of question characteristics;
compare the set of question characteristics found in the received input question to a set of data characteristics respectively describing data in each corpus of a corpora;
for each question characteristic in the set of found question characteristics:
responsive to the question characteristic being more related to a data characteristic in the set of data characteristics, assign a first weight to the corpus within which data associated with the data characteristic resides; and
responsive to the question characteristic being less related to the data characteristic in the set of data characteristics, assign a second weight to the corpus within which the data associated with the data characteristic resides, wherein the first weight is greater than the second weight; and
selectively search for an answer to the received input question in one or more corpora with a higher weighting preferentially to one or more corpora with a lower weighting.
2. The computer program product of claim 1 , wherein the first weight and the second weight are based on a set of predetermined weighting characteristics.
3. The computer program product of claim 1 , wherein the first weight and the second weight are defined by a user.
4. The computer program product of claim 1 , wherein the set of data characteristics are identified by the computer readable program further causing the computing device to:
analyze each data for a set of data characteristics; and
store the set of data characteristics in a characteristics data structure as being associated with a corpus where the data is ingested.
5. The computer program product of claim 4 , wherein the set of data characteristics is one or more of an average sentence length, various counts of sentence sub-structure, phrase boundaries, average word length, number of characters in a sentence, number of words in a passage, number of sentences in a passage, or average sentence lexical composition.
6. The computer program product of claim 1 , wherein the set of question characteristics is one or more of an average sentence length, various counts of sentence sub-structure, phrase boundaries, average word length, number of characters in a sentence, number of words in a passage, number of sentences in a passage, or average sentence lexical composition.
7. The computer program product of claim 1 , wherein the data comprises one or more of media, blogs, personal experiences, books, journal and magazine articles, expert opinions, encyclopedias, or web pages.
8. An apparatus comprising:
a processor; and
a memory coupled to the processor, wherein the memory comprises instructions which, when executed by the processor, cause the processor to:
parse a received input question having a set of question characteristics;
compare the set of question characteristics found in the received input question to a set of data characteristics respectively describing data in each corpus of a corpora;
for each question characteristic in the set of found question characteristics:
responsive to the question characteristic being more related to a data characteristic in the set of data characteristics, assign a first weight to the corpus within which data associated with the data characteristic resides; and
responsive to the question characteristic being less related to the data characteristic in the set of data characteristics, assign a second weight to the corpus within which the data associated with the data characteristic resides, wherein the first weight is greater than the second weight; and
selectively search for an answer to the received input question in one or more corpora with a higher weighting preferentially to one or more corpora with a lower weighting.
9. The apparatus of claim 8 , wherein the first weight and the second weight are based on a set of predetermined weighting characteristics.
10. The apparatus of claim 8 , wherein the first weight and the second weight are defined by a user.
11. The apparatus of claim 8 , wherein the set of data characteristics are identified by the instructions further causing the processor to:
analyze each data for a set of data characteristics; and
store the set of data characteristics in a characteristics data structure as being associated with a corpus where the data is ingested.
12. The apparatus of claim 11 , wherein the set of data characteristics is one or more of an average sentence length, various counts of sentence sub-structure, phrase boundaries, average word length, number of characters in a sentence, number of words in a passage, number of sentences in a passage, or average sentence lexical composition.
13. The apparatus of claim 8 , wherein the set of question characteristics is one or more of an average sentence length, various counts of sentence sub-structure, phrase boundaries, average word length, number of characters in a sentence, number of words in a passage, number of sentences in a passage, or average sentence lexical composition.
14. The apparatus of claim 8 , wherein the data comprises one or more of media, blogs, personal experiences, books, journal and magazine articles, expert opinions, encyclopedias, or web pages.