class AssertionDatasetEncoder extends AnyRef
This class contains methods for working with assertion dataset, such as split, normalise, decode
- Alphabetic
- By Inheritance
- AssertionDatasetEncoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AssertionDatasetEncoder(params: DatasetEncoderParams, extraFeatSize: Int = 10)
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
centerIfTooLong(maxSentLen: Int)(sentence: WordpieceEmbeddingsSentence, start: Int, end: Int): (WordpieceEmbeddingsSentence, Int, Int)
This method normalizes the input sentence by centering it around the target This method should apply only if the target sentence is outside the max sentence length
This method normalizes the input sentence by centering it around the target This method should apply only if the target sentence is outside the max sentence length
- maxSentLen
an array of sentences to encode
- sentence
a candidate sentence to center for
- start
a start index
- end
an end index
- returns
a triplet, which contains embedding sentence, begin and end indexes
- Attributes
- protected
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
decodeOutputData(tagIds: Array[Int]): Array[String]
This method decodes array on Int
This method decodes array on Int
- tagIds
an Array of Int, to decode for
- returns
an Array of String, which represents decoded instances
-
def
encodeInputData(sentences: Array[WordpieceEmbeddingsSentence], start: Array[Int], end: Array[Int], embeddingsDim: Int, maxSentenceLength: Int, scopeWindow: (Int, Int)): AssertionBatch
This method encodes the sentences using the embeddings dimensionality, start and end index At this point the graph does not support feeding a dynamic maxSentenceLength
This method encodes the sentences using the embeddings dimensionality, start and end index At this point the graph does not support feeding a dynamic maxSentenceLength
- sentences
an array of sentences to encode
- start
an array of start positions
- end
an array of end positions
- embeddingsDim
a dimensionality of target Embeddings
- maxSentenceLength
a length, which constrains the maximum sentence length
- returns
an instance of AssertionBatch
-
def
encodeOneHot(label: String): Array[Float]
This method performs one hot encoding of the label
This method performs one hot encoding of the label
- label
a label to represent as one-hot representation
- returns
an array in one-hot format, representing input label
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val extraFeatSize: Int
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
l2norm(xs: Array[Float]): Float
This simple method computes L2 distance of input array
This simple method computes L2 distance of input array
- xs
an array of Float to get the distance for
- returns
a Float, representing L2 distance
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val nonTargetMark: Seq[Float]
-
final
def
normalize(vec: Array[Float]): Array[Float]
This method normalizes the input array using the L2 norm distance
This method normalizes the input array using the L2 norm distance
- vec
an array of Float to normalize
- returns
a normalized version of input array
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val params: DatasetEncoderParams
-
def
randomSplit(dataset: Seq[Datapoint], fraction: Float): (Seq[Datapoint], Seq[Datapoint])
This method splits the input dataset into the train and test with given proportion
This method splits the input dataset into the train and test with given proportion
- dataset
a Sequence of DataPoints to split for
- fraction
a proportion which represents in what scale we need to split the input data
- returns
train and test fraction of original dataset
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val tags: Array[String]
- val tags2Id: Map[String, Int]
- val targetMark: Seq[Float]
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()