title: Extracting Keywords from text in R
body: <p>I want to extract Insurance services related keywords from text in R. I created keywords list and used common function from <code>qdap</code> library.</p>
  
  <pre><code>   bag &lt;- bag_o_words(corpus) 
     b &lt;- common(bag,keywords,overlap="all")
  </code></pre>
  
  <p>But the results are just the common words with more than 1 frequency.
  I have also used <code>RKEA</code> library.</p>
  
  <pre><code>keywords &lt;- c("directasia", "directasia.com", "Frank", "frank", "OCBC", "NTUC",
                "NTUC Income", "Frank by OCBC", "customer service", "atm",
                "insurance", "claim", "agent", "premium", "policy", "customer care",
                "customer", "draft", "account", "credit", "savings","debit","ivr",
                "offer", "transacation", "banking", "website", "mobile", "i-safe",
                 "customer", "demat", "network", "phone", "interest", "loan",
                 "transfer", "deposit",  "otp", "rewards", "redemption")
     tmpdir &lt;- tempfile()
     dir.create(tmpdir)
     model &lt;- file.path(tmpdir, "crudeModel")
     createModel(corpus,keywords,model)
     extractKeywords(corpus, model)
  </code></pre>
  
  <p>However I am getting the following errors</p>
  
  <blockquote>
    <p>Error in createModel(corpus, keywords, model) : number of documents and keywords does not match</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>Error in .jcall(ke, "V", "extractKeyphrases", .jcall(ke,Ljava/util/Hashtable;",  :  java.io.FileNotFoundException: C:\Users\Bitanshu\AppData\Local\Temp\RtmpEHu9uA\file14c4160f41c2\crudeModel (The system cannot find the file specified)</p>
  </blockquote>
  
  <p>The second error is I think because <code>createModel</code> is not successful.</p>
  
  <p>Can anyone suggest how to rectify this or an alternative approach?
  The text data has been extracted from twitter.</p>