urceCode"><pre class="sourceCode r"><code><span><span class="fu">calculate_rouge</span><span class="op">(</span></span>
<span>  <span class="va">predicted_txts</span>,</span>
<span>  <span class="va">reference_txts</span>,</span>
<span>  rouge_keys <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"rouge1"</span>, <span class="st">"rouge2"</span>, <span class="st">"rougeL"</span><span class="op">)</s