Packages

o

com.johnsnowlabs.nlp.annotators.graph

AssertionDLGraphResolver

object AssertionDLGraphResolver

Finds the best embedded (or user provided) graph for an AssertionDLApproach training run.

Contrary to the dense classifier graphs, nothing is padded on the Scala side here: the word embeddings are fed with their real dimension and the labels are fed one hot encoded with the real number of classes. Both dimensions must therefore match the graph exactly. The maximum sentence length is not part of the contract anymore: graphs built with sparknlp_jsl.training.tf_graph accept any sequence length, so setMaxSentLen does not require a dedicated graph.

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

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. val DefaultHiddenUnits: Int

    The n_hidden value all the embedded graphs are built with.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  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. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def listGraphs(localGraphPath: Option[String] = None): Seq[AssertionDLGraphInfo]

    Lists the AssertionDL graphs of the JAR resources or of a user provided folder.

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def parseDimensions(fileName: String): Option[(Int, Int, Int)]
  18. val resourceFolder: String

    JAR resource folder with the embedded AssertionDL graphs

  19. def searchForSuitableGraph(embeddingsDim: Int, nClasses: Int, localGraphPath: Option[String] = None): AssertionDLGraphInfo

    Returns the graph matching the embeddings dimension and the number of labels of the training dataset.

    Returns the graph matching the embeddings dimension and the number of labels of the training dataset.

    embeddingsDim

    dimension of the word embeddings of the pipeline

    nClasses

    number of distinct labels of the training dataset

    localGraphPath

    optional user folder with graphs, takes precedence over the embedded ones

  20. def selectGraph(candidates: Seq[AssertionDLGraphInfo], embeddingsDim: Int, nClasses: Int): Option[AssertionDLGraphInfo]

    Picks the graph to train with out of the given candidates: both dimensions must match exactly, the topology of the embedded graphs is preferred, then the largest capacity.

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped