Create a Machine Learning Annotator Plugin
enrichment for new collections
You will need to copy /opt/ibm/wex/nlp/lib
in oneWEX to lib
to resolve the dependencies.
-
Edit
plugins/mla-plugin/src/main/resources/server.properties
, Configure WEX AC serverwexac.host=localhost wexac.port=8393 wexac.collectionId=ml
-
run
gradle build
to build Mahchine Learning Annotator plugin, find the plugin archive under plugin folder.Note 1: Gradle 5 is not available. Use Gradle 4.
Note 2: Implement only one implementation of CustomEnrichment
-
Create file resource
-
Upload Mahchine Learning Annotator Plugin
-
Get facet mappings from WEX AC
- Get security token
- Get facet tree
- Convert to oneWEX facet
-
Create Enrichment
- reate enrichment with file resource
-
Enable Mahchine Learning Annotator enrichment
- Enable the enrichment and rebuild the index
For Step 2, an import tool is provided for converting and importing the facet mappings
Go to importer and run ./import.sh
with following environment variables. Bash and Python3 is required.
Name | Description |
---|---|
ONEWEX_HOST | oneWEX host |
WEXAC_HOST | WEX AC host |
WEXAC_USER | WEX AC user name, esadmin by default |
WEXAC_PASSWORD | WEX AC user password, prompt for input if missing |
WEXAC_COLLECTION_ID | WEX AC collection ID |
PATH_TO_PLUGIN | Path to Mahchine Learning Annotator plugin, build/plugins/plugin-mla-plugin-0.0.1-SNAPSHOT.zip by default |
- Example
ONEWEX_HOST=localhost WEXAC_HOST=localhost WEXAC_COLLECTION_ID=ml ./import.sh