Package ai.djl

Interface Application.NLP

  • Enclosing class:
    Application

    public static interface Application.NLP
    The common set of applications for natural language processing (text data).
    • Field Detail

      • FILL_MASK

        static final Application FILL_MASK
        An application that masking some words in a sentence and predicting which words should replace those masks.
      • QUESTION_ANSWER

        static final Application QUESTION_ANSWER
        An application that a reference document and a question about the document and returns text answering the question.

        The typical signature is Model<QAInput, String>.

      • TEXT_CLASSIFICATION

        static final Application TEXT_CLASSIFICATION
        An application that classifies text data.

        The typical signature is Model<String, Classifications>.

      • SENTIMENT_ANALYSIS

        static final Application SENTIMENT_ANALYSIS
        An application that classifies text into positive or negative, a specific case of TEXT_CLASSIFICATION.
      • TOKEN_CLASSIFICATION

        static final Application TOKEN_CLASSIFICATION
        A natural language understanding application that assigns a label to some tokens in a text.
      • WORD_EMBEDDING

        static final Application WORD_EMBEDDING
        An application that takes a word and returns a feature vector that represents the word.

        The most representative signature is Model<String, NDArray>. However, many models will only embed a fixed Vocabulary of words. These words are usually given integer indices which may make the signature Model<String, NDArray> (or NDArray). The signatures may also use singleton NDLists instead of NDArray.

      • TEXT_GENERATION

        static final Application TEXT_GENERATION
      • MACHINE_TRANSLATION

        static final Application MACHINE_TRANSLATION
        An application that translates text from one language to another.

        The typical signature is Model<String, String>.

      • MULTIPLE_CHOICE

        static final Application MULTIPLE_CHOICE
        An application to represent a multiple choice question.
      • TEXT_EMBEDDING

        static final Application TEXT_EMBEDDING
        An application that takes text and returns a feature vector that represents the text.

        The special case where the text consists of only a word is a WORD_EMBEDDING. The typical signature is Model<String, NDArray>.