pan class="kw">import</span> com.johnsnowlabs.nlp.annotators.keyword.yake.YakeKeywordExtraction
<span class="kw">import</span> org.apache.spark.ml.Pipeline

<span class="kw">val</span> documentAssembler = <span class="kw">new</span> DocumentAssembler()
  .setInputCol(<span class="lit">"text"</span>)
  .setOutputCol(<span class="lit">"document"</span>)

<span class="kw">val</span> sentenceDetector = <span class="kw">new</span> SentenceDetector()
  .setInputCols(<span class="lit">"document"</span>)
  .setOutp