Packages

o

com.johnsnowlabs.nlp.util.io

ResourceHelper

object ResourceHelper

Helper one-place for IO management. Streams, source and external input should be handled from here

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ResourceHelper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class SourceStream(resource: String) extends Product with Serializable

    Structure for a SourceStream coming from compiled content

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. def copyToLocal(path: String): String
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def flattenRevertValuesAsKeys(er: ExternalResource): Map[String, String]

    For multiple values per keys, this optimizer flattens all values for keys to have constant access

  11. def getActiveSparkSession: SparkSession
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def getFilesContentBuffer(externalResource: ExternalResource): Seq[Iterator[String]]
  14. def getResourceFile(path: String): URL
  15. def getResourceStream(path: String): InputStream

    NOT thread safe.

    NOT thread safe. Do not call from executors.

  16. def getWordCount(externalResource: ExternalResource, wordCount: Map[String, Long] = ..., pipeline: Option[PipelineModel] = None): Map[String, Long]
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def listLocalFiles(path: String): List[File]
  20. def listResourceDirectory(path: String): Seq[String]
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. def parseKeyListValues(externalResource: ExternalResource): Map[String, List[String]]
  25. def parseKeyValueText(er: ExternalResource): Map[String, String]

    General purpose key value parser from source Currently read only text files

  26. def parseLines(er: ExternalResource): Array[String]

    General purpose line parser from source Currently read only text files

  27. def parseLinesIterator(er: ExternalResource): Seq[Iterator[String]]

    General purpose line parser from source Currently read only text files

  28. def parseTupleSentences(er: ExternalResource): Array[TaggedSentence]

    General purpose tuple parser from source Currently read only text files

  29. def parseTupleSentencesDS(er: ExternalResource): Dataset[TaggedSentence]
  30. def parseTupleText(er: ExternalResource): Array[(String, String)]

    General purpose tuple parser from source Currently read only text files

  31. def readParquetSparkDataFrame(er: ExternalResource): DataFrame

    General purpose read saved Parquet Currently read only Parquet format

  32. lazy val spark: SparkSession
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    AnyRef → Any
  35. def validFile(path: String): Boolean
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped