Class Hermes


  • public final class Hermes
    extends Object

    Convenience methods for getting common configuration options.

    Author:
    David B. Bracewell
    • Field Detail

      • HERMES_RESOURCES_CONFIG

        public static final String HERMES_RESOURCES_CONFIG
        The config key for Hermes's resource directory
        See Also:
        Constant Field Values
      • IDENTIFIER

        public static final String IDENTIFIER
        Definition of an Identifier string for use in various components of Hermes
    • Method Detail

      • defaultImplementation

        public static Class<?> defaultImplementation​(@NonNull
                                                     @NonNull Language language,
                                                     @NonNull
                                                     @NonNull String resource)
        Attempts to find and return the Class for the default implementation of the given resource for the given language as defined by: com.gengoai.hermes.[LANGUAGE_CODE_LOWER].[LANGUAGE_CODE_UPPER]Resource, e.g. com.gengoai.hermes.en.ENStemmer.
        Parameters:
        language - the language
        resource - the resource type
        Returns:
        the class or null
      • defaultLanguage

        public static Language defaultLanguage()
        Get the default language. The default language is specified using hermes.defaultLanguage/code>. If the configuration option is not set, it will default to the language matching the system locale.
        Returns:
        the default language
      • getResourcesDir

        public static Resource getResourcesDir()
        Returns:
        The directory containing Hermes's resource files