Package com.gengoai.hermes
Class Hermes
- java.lang.Object
-
- com.gengoai.hermes.Hermes
-
public final class Hermes extends Object
Convenience methods for getting common configuration options.
- Author:
- David B. Bracewell
-
-
Field Summary
Fields Modifier and Type Field Description static String
HERMES_PACKAGE
The Hermes packagestatic String
HERMES_RESOURCES_CONFIG
The config key for Hermes's resource directorystatic String
IDENTIFIER
Definition of an Identifier string for use in various components of Hermes
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Class<?>
defaultImplementation(@NonNull Language language, @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.static Language
defaultLanguage()
Get the default language.static Resource
getResourcesDir()
-
-
-
Field Detail
-
HERMES_PACKAGE
public static final String HERMES_PACKAGE
The Hermes package- See Also:
- Constant Field Values
-
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 languageresource
- the resource type- Returns:
- the class or null
-
defaultLanguage
public static Language defaultLanguage()
Get the default language. The default language is specified usinghermes.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
-
-