I am trying to build an Shiny App that can dynamically display sentences from a database column by matching a Corpus from a text box , ie. as users starts typing the text in the text box, all the sentences that would match (corpus from the text typed) need to be displayed by order of number of words that that matchs the corpus
I tried kwic
function but that is not helping match corpus dynamically, approach that I tried,
require(quanteda)
require(tm)
data(crude, package = "tm")
mycorpus <- corpus(crude)
kwic(mycorpus, "company") # Pass the words from the text box corpus
request help...