case class ExternalResource(path: String, readAs: Format, options: Map[String, String]) extends WritableAnnotatorComponent with Product with Serializable
This represents an external source which contains information into how an external resource shall be read by Spark-NLP's Resource Helper.
ReadAs.TEXTwill configure the file to be read locally as textReadAs.BINARYwill configure the file to be read locally as binaryReadAs.SPARKwill configure the file to be read by Spark."format"will need to be defined inoptions.
Example
ExternalResource( "src/test/resources/regex-matcher/rules.txt", ReadAs.TEXT, Map("delimiter" -> ",") ) ExternalResource( "src/test/resources/regex-matcher/rules.txt", ReadAs.SPARK, Map("format" -> "text", "delimiter" -> ",") )
- path
Path to the resource
- readAs
How to interpret the resource. Possible values are
ReadAs.SPARK, ReadAs.TEXT, ReadAs.BINARY- options
Options for Spark. Option
formatneeds to be set ifreadAsis set toReadAs.SPARK
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- ExternalResource
- Product
- Equals
- WritableAnnotatorComponent
- Serializable
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- val options: Map[String, String]
- val path: String
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- val readAs: Format
- def serialize: SerializedExternalResource
- Definition Classes
- ExternalResource → WritableAnnotatorComponent
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)