package io
Ordering
- Alphabetic
Visibility
- Public
- All
Type Members
-
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.
This represents an external source which contains information into how an external resource shall be read by Spark-NLP's Resource Helper.
ReadAs.TEXT
will configure the file to be read locally as textReadAs.BINARY
will configure the file to be read locally as binaryReadAs.SPARK
will 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
format
needs to be set ifreadAs
is set toReadAs.SPARK
Value Members
- object CloudStorageType extends Enumeration
- object ExternalResource extends Serializable
-
object
MatchStrategy extends Enumeration
Allowed strategies for RuleFactory applications regarding replacement
- object OutputHelper
- object ReadAs extends Enumeration
-
object
ResourceHelper
Helper one-place for IO management.
Helper one-place for IO management. Streams, source and external input should be handled from here