ew</span> YakeKeywordExtraction()
  .setInputCols(<span class="lit">"token"</span>)
  .setOutputCol(<span class="lit">"keywords"</span>)
  .setThreshold(<span class="num">0.6</span>f)
  .setMinNGrams(<span class="num">2</span>)
  .setNKeywords(<span class="num">10</span>)

<span class="kw">val</span> pipeline = <span class="kw">new</span> Pipeline().setStages(<span class="std">Array</span>(
  documentAssembler,
  sentenceDetector,
  token,
  keywords
))

<span class="kw">val</span> data = <span class="std">