All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.johnsnowlabs.nlp.annotators.common.TokenizedSentence.scala Maven / Gradle / Ivy

package com.johnsnowlabs.nlp.annotators.common

/**
  * Created by Saif Addin on 6/18/2017.
  */

/** Internal structure for a sentence that is split into tokens */
case class TokenizedSentence(indexedTokens: Array[IndexedToken], sentenceIndex: Int) {
  lazy val tokens = indexedTokens.map(t => t.token)

  def condense = tokens.mkString(" ")
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy