an class="sd">    &gt;&gt;&gt; sentence = SentenceDetector() \\</span>
<span class="sd">    ...     .setInputCols([&quot;document&quot;]) \\</span>
<span class="sd">    ...     .setOutputCol(&quot;sentence&quot;)</span>
<span class="sd">    &gt;&gt;&gt; embeddings = BertSentenceEmbeddings.pretrained(&quot;sent_small_bert_L2_128&quot;) \\</span>
<span class="sd">    ...     .setInputCols([&quot;sentence&quot;]) \\</span>
<span class="sd">    ...     .setOutputCol(&quot;sentence_bert_embeddings&quot;)</span>
