public class ModelManifestUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
MANIFEST_BEAM_SIZE |
static String |
MANIFEST_CREATOR_VERSION |
static String |
MANIFEST_ENCRYPTION_KEY |
static String |
MANIFEST_GENERATION |
static String |
MANIFEST_LANGUAGE_CODE |
static String |
MANIFEST_MODEL_FILENAME |
static String |
MANIFEST_MODEL_ID |
static String |
MANIFEST_MODEL_NAME |
static String |
MANIFEST_MODEL_SOURCE |
static String |
MANIFEST_MODEL_SUBTYPE |
static String |
MANIFEST_MODEL_TYPE |
static String |
MANIFEST_VECTORS_FILENAME |
static String |
MANIFEST_VECTORS_SOURCE |
static String |
MANIFEST_WINDOW_SIZE |
| Constructor and Description |
|---|
ModelManifestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
generateSecondGenModelManifest(File manifestFile,
SecondGenModelManifest modelManifest)
Generates a model manifest for a second generation model.
|
static void |
generateStandardModelManifest(File manifestFile,
String modelId,
String name,
String type,
String subtype,
String modelFile,
com.neovisionaries.i18n.LanguageCode languageCode,
String encryptionKey,
String creatorVersion,
String source)
Generates a model manifest file.
|
static void |
generateStandardModelManifest(StandardModelManifest modelManifest,
File manifestFile)
Generates a model manifest file.
|
static List<ModelManifest> |
getModelManifests(String modelsDirectory)
Get the
manifests for NER models. |
static List<ModelManifest> |
getModelManifests(String modelsDirectory,
String type)
Get the
manifests for NER models. |
static ModelManifest |
readManifest(String fullManifestPath)
Reads a model manifest.
|
public static final String MANIFEST_MODEL_ID
public static final String MANIFEST_MODEL_NAME
public static final String MANIFEST_MODEL_TYPE
public static final String MANIFEST_MODEL_SUBTYPE
public static final String MANIFEST_MODEL_FILENAME
public static final String MANIFEST_LANGUAGE_CODE
public static final String MANIFEST_ENCRYPTION_KEY
public static final String MANIFEST_CREATOR_VERSION
public static final String MANIFEST_MODEL_SOURCE
public static final String MANIFEST_VECTORS_SOURCE
public static final String MANIFEST_BEAM_SIZE
public static final String MANIFEST_GENERATION
public static final String MANIFEST_VECTORS_FILENAME
public static final String MANIFEST_WINDOW_SIZE
public static void generateStandardModelManifest(StandardModelManifest modelManifest, File manifestFile) throws IOException
manifestFile - The File to write.modelManifest - The StandardModelManifest.IOException - Thrown if an existing file cannot be deleted or if the manifest file cannot be written.public static void generateStandardModelManifest(File manifestFile, String modelId, String name, String type, String subtype, String modelFile, com.neovisionaries.i18n.LanguageCode languageCode, String encryptionKey, String creatorVersion, String source) throws IOException
manifestFile - The File to write.modelId - The model ID.name - The name of the model. This is not a file name.type - The entity class or "sentence" or "token".subtype - The model subtype (dictionary).modelFile - The filename of the model without any path.languageCode - The LanguageCode.encryptionKey - The model's encryption key.creatorVersion - The version of the implementing application.source - A URL where the model can be downloaded.IOException - Thrown if an existing file cannot be deleted or if the manifest file cannot be written.public static void generateSecondGenModelManifest(File manifestFile, SecondGenModelManifest modelManifest) throws IOException
manifestFile - The File to write.modelManifest - The manifest to write.IOException - Thrown if an existing file cannot be deleted or if the manifest file cannot be written.public static List<ModelManifest> getModelManifests(String modelsDirectory, String type)
manifests for NER models.modelsDirectory - The directory containing the model manifests.type - The type of model manifests to look for.manifests.public static List<ModelManifest> getModelManifests(String modelsDirectory)
manifests for NER models.modelsDirectory - The directory containing the model manifests.manifests.public static ModelManifest readManifest(String fullManifestPath) throws Exception
Copyright © 2018. All rights reserved.