Class ClassLanguageModel

  • All Implemented Interfaces:
    AutoCloseable

    public final class ClassLanguageModel
    extends Grammar
    implements AutoCloseable
    Represents a ClassLanguageModel. ClassLanguageModels are only usable in specific scenarios and are not generally available. Note: close() must be called in order to release underlying resources held by the object. Added in version 1.7.0
    • Method Detail

      • fromStorageId

        public static ClassLanguageModel fromStorageId​(String id)
        Creates a classLanguageModel from its storage Id. Creating a ClassLanguageModel from a storage ID is only usable in specific scenarios and is not generally available.
        Parameters:
        id - The Id of the Class Language Model
        Returns:
        classLanguageModel associated with the given Id.
      • assignClass

        public void assignClass​(String className,
                                Grammar grammar)
        Assigns a grammar to a specified class in a language model.
        Parameters:
        className - The name of a class in the language model.
        grammar - The grammar to associate with the class.