Record Class Embedding
java.lang.Object
java.lang.Record
me.damoebe.architectures.transformer.embedding.Embedding
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.Loads an Embedding object data from a token by positional encoding it.intGetter for the size of the data array.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Embedding
public Embedding()Constructs an empty Embedding-Object -
Embedding
-
-
Method Details
-
fromToken
Loads an Embedding object data from a token by positional encoding it.- Parameters:
token- The token that should be transformed into an embedding.tokenPos- The position of the provided Token object- Returns:
- The updated object from which the function is called
-
getEmbeddingSize
public int getEmbeddingSize()Getter for the size of the data array.- Returns:
- The data Double List size.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
data
-