- To be or not to be that is the question
- This was the best of times the worst of times
- Ask not what your country asks of you but what you can do for your country
- For a long time I used to go to bed early
- Shakespeare and Dickens are both famous British authors
- By George, I shouldâve known that! Iâll be a dickens!
- An accomplished woman almost always knows more than we men, though her knowledge is of a different sort
- A search for âaskâ returns one result: sentence 3.
- A search for âtimeâ returns two result: sentences 2 and 4.
- A search for âbeâ returns four results: sentence 1 and 6 âbeâ, sentence 2 âbestâ, and sentence 4 âbedâ.
Where textual matching doesnât work
Consider these searches on the preceding sentences:- âqestionâ (âquestionâ mistyped). No sentences are returned.
- âbeâ. What sentence should come first? The ones that match exactly (the word âbeâ)? Or some other criteria?
- âliterary quotesâ? Textual matching doesnât know anything about these sentences - are these political or literary quotes? The quotes need to be classified, tagged as coming from novels, politicians, authors, countries.
Going beyond textual matching
Simple textual matching wonât solve every search problem: itâs only the starting point.Add structure
By adding more information to the preceding sentences (records), their relevance can be improved:- âTo be or not to be, that is the questionâ, shakespeare, british, hamlet, theater
- âIt was the best of times, it was the worst of timesâ, dickens, british, tale of two cities, novel
- âAsk not what your country asks of you but what you can do for your countryâ, kennedy, american, speech, politics
- âFor a long time I used to go to bed earlyâ, proust, french, recherche, novel
- âShakespeare and Dickens are both famous British authorsâ, georgette, british, history of british literature, essay
- âBy George, I shouldâve known that! Iâll be a dickens!â, landly, british, my fair lady, theater
- âAn accomplished woman almost always knows more than we men, though her knowledge is of a different sort.â, george elliot, british, middlemarch, novel