c

com.johnsnowlabs.nlp.serialization

StructJSONFeature

class StructJSONFeature[TValue] extends StructFeature[TValue] with JSONFeature

Struct Feature for JSON serialization/deserialization.

TValue

The type of the value to be serialized/deserialized

Linear Supertypes
JSONFeature, StructFeature[TValue], Feature[TValue, TValue, TValue], Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StructJSONFeature
  2. JSONFeature
  3. StructFeature
  4. Feature
  5. Serializable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StructJSONFeature(model: HasFeatures, name: String)(jsonSerializer: (TValue) ⇒ String, jsonDeserializer: (String) ⇒ TValue)(implicit arg0: ClassTag[TValue])

    model

    The parent HasFeatures model

    name

    The name of the feature

    jsonSerializer

    Function to serialize an instance of TValue to JSON string

    jsonDeserializer

    Function to deserialize the value from JSON string and return an instance of TValue

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. final var broadcastValue: Option[Broadcast[TValue]]
    Attributes
    protected
    Definition Classes
    Feature
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def deserialize(spark: SparkSession, path: String, field: String): Option[_]
    Definition Classes
    Feature
  8. def deserializeDataset(spark: SparkSession, path: String, field: String): Option[TValue]
    Definition Classes
    StructFeatureFeature
  9. def deserializeObject(spark: SparkSession, path: String, field: String): Option[TValue]
    Definition Classes
    StructJSONFeatureStructFeatureFeature
  10. def deserializeWithFallback[ObjectType](spark: SparkSession, path: String)(implicit arg0: ClassTag[ObjectType]): RDD[ObjectType]

    Loads an object from a SequenceFile containing serialized objects.

    Loads an object from a SequenceFile containing serialized objects. It tries to load the tuple across Scala version, handling serialVersionUID mismatches.

    Adapted from sparkContext.objectFile:

    "Load an RDD saved as a SequenceFile containing serialized objects, with NullWritable keys and BytesWritable values that contain a serialized partition."

    path

    directory to the input data files, the path can be comma separated paths as a list of inputs

    returns

    RDD representing deserialized data from the file(s)

    Attributes
    protected
    Definition Classes
    Feature
  11. implicit val encoder: Encoder[TValue]
    Definition Classes
    StructFeature
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final var fallbackLazyValue: Option[() ⇒ TValue]
    Attributes
    protected
    Definition Classes
    Feature
  15. final var fallbackRawValue: Option[TValue]
    Attributes
    protected
    Definition Classes
    Feature
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def get: Option[TValue]
    Definition Classes
    Feature
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def getFieldPath(path: String, field: String): Path
    Attributes
    protected
    Definition Classes
    Feature
  20. final def getOrDefault: TValue
    Definition Classes
    Feature
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. final var isProtected: Boolean
    Attributes
    protected
    Definition Classes
    Feature
  24. final def isSet: Boolean
    Definition Classes
    Feature
  25. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    Feature
  26. val name: String
    Definition Classes
    StructJSONFeatureStructFeatureFeature
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def orDefault: Option[TValue]
    Definition Classes
    Feature
  31. final var rawValue: Option[TValue]
    Attributes
    protected
    Definition Classes
    Feature
  32. def readFieldJSON(spark: SparkSession, path: String, field: String): Option[JValue]
    Definition Classes
    JSONFeature
  33. def readFieldJSONString(spark: SparkSession, path: String, field: String): Option[String]
    Attributes
    protected
    Definition Classes
    JSONFeature
  34. def resolveCustomLegacyClasses(osc: ObjectStreamClass): ObjectStreamClass

    Method to provide additional legacy class descriptor mappings for custom classes.

    Method to provide additional legacy class descriptor mappings for custom classes. If none are found, should return null.

    osc

    The ObjectStreamClass to resolve

    returns

    The resolved ObjectStreamClass, or null if not found

    Attributes
    protected
    Definition Classes
    Feature
  35. val serializationMode: String
    Definition Classes
    Feature
  36. final def serialize(spark: SparkSession, path: String, field: String, value: TValue): Unit
    Definition Classes
    Feature
  37. def serializeDataset(spark: SparkSession, path: String, field: String, value: TValue): Unit
    Definition Classes
    StructFeatureFeature
  38. final def serializeInfer(spark: SparkSession, path: String, field: String, value: Any): Unit
    Definition Classes
    Feature
  39. def serializeObject(spark: SparkSession, path: String, field: String, value: TValue): Unit
    Definition Classes
    StructJSONFeatureStructFeatureFeature
  40. def setFallback(v: Option[() ⇒ TValue]): HasFeatures
    Definition Classes
    Feature
  41. final def setProtected(): StructJSONFeature.this.type

    Sets this feature to be protected and only settable once.

    Sets this feature to be protected and only settable once.

    returns

    This Feature

    Definition Classes
    Feature
  42. final def setValue(value: Option[Any]): HasFeatures
    Definition Classes
    Feature
  43. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  44. def toString(): String
    Definition Classes
    AnyRef → Any
  45. val useBroadcast: Boolean
    Definition Classes
    Feature
  46. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  49. def writeFieldJSON(spark: SparkSession, path: String, field: String, jsonSerialized: String): Unit
    Attributes
    protected
    Definition Classes
    JSONFeature

Inherited from JSONFeature

Inherited from StructFeature[TValue]

Inherited from Feature[TValue, TValue, TValue]

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped