-word expression in the topic model even if the noun is always part of a multi-word expression. You can do this as follows.</p>
<pre><code class="hljs css r"><span class="hljs-comment">## Recode tokens to keywords, if it is not in the list of tokens, set to NA</span>
x$mwe &lt;- txt_recode_ngram(x$token, compound = keyw_rake$keyword, ngram = keyw_rake$ngram)
x$mwe &lt;- ifelse(x$mwe %<span class="hljs-keyword">in</span>% keyw_rake$keyword, x$mwe, <span class="hljs-literal">NA</span>)

<span class="hljs-comm