Class Embedder.FailingEmbedder

  • All Implemented Interfaces:
    Embedder
    Enclosing interface:
    Embedder

    public static class Embedder.FailingEmbedder
    extends java.lang.Object
    implements Embedder
    • Constructor Summary

      Constructors 
      Constructor Description
      FailingEmbedder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.Integer> embed​(java.lang.String text, Embedder.Context context)
      Converts text into a list of token id's (a vector embedding)
      com.yahoo.tensor.Tensor embed​(java.lang.String text, Embedder.Context context, com.yahoo.tensor.TensorType tensorType)
      Converts text into tokens in a tensor.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FailingEmbedder

        public FailingEmbedder()
    • Method Detail

      • embed

        public java.util.List<java.lang.Integer> embed​(java.lang.String text,
                                                       Embedder.Context context)
        Description copied from interface: Embedder
        Converts text into a list of token id's (a vector embedding)
        Specified by:
        embed in interface Embedder
        Parameters:
        text - the text to embed
        context - the context which may influence an embedder's behavior
        Returns:
        the text embedded as a list of token ids
      • embed

        public com.yahoo.tensor.Tensor embed​(java.lang.String text,
                                             Embedder.Context context,
                                             com.yahoo.tensor.TensorType tensorType)
        Description copied from interface: Embedder
        Converts text into tokens in a tensor. The information contained in the embedding may depend on the tensor type.
        Specified by:
        embed in interface Embedder
        Parameters:
        text - the text to embed
        context - the context which may influence an embedder's behavior
        tensorType - the type of the tensor to be returned
        Returns:
        the tensor embedding of the text, as the spoecified tensor type