title: How to specify text segmentation in R?
body: <p>I am trying to separate my text into two meaningful words. It separates the words but it also separates two character words like "is","it",etc.</p>
  
  <p>Is there a way to specify or set the function so that it will ignore these two character words when text segmenting?  </p>
  
  <pre><code>    wl &lt;- read.table("http://www-personal.umich.edu/~jlawler/wordlist")$V1
  
      &gt; check.word &lt;- function(x, wl) {
      +   x &lt;- tolower(x)
      +   nc &lt;- nchar(x)
      +   parts &lt;- sapply(1:(nc-1), function(y) c(substr(x, 1, y), 
      substr(x, y+1, nc)))
      +   parts[,parts[1,] %in% wl &amp; parts[2,] %in% wl] 
      + }
      &gt; check.word("isgood",wl)
      [1] "is"   "good"
      &gt; check.word("is",wl)
      [1] "i" "s"
  </code></pre>