With TagButler we have created an application that automatically adds tags to Connections items when they have been created.
This time we are using the Event SPI.
The Event SPI allows us to register for certain events, in this case CREATE events.
Below a snippet of code of our class that implements the AbstractEventHandler
ContentData contentData = event.getContentData();
RESTClient wexClient = new RESTClient(WATSON_COLLECTIONID, WATSON_SERVER_SCHEME, WATSON_HOST,
Set<String> tags = wexClient.analyseText(contentData.getContent());
String blogAtomPath = event.getItem().getAtomPath();
TagThisBlogItem tagThisBlogItem = new TagThisBlogItem();
The RESTClient and TagThisBlogItem classes handle the interaction with
A. Watson Explorer Content Analytics using the REST Endpoints:
Use the text endpoint in case of blogs/wikis/topics etc..
Use the content endpoint in case of binary file/attachment
B. IBM Connections, to add the new tags to the (blog)item
In the demo we will show that we
- Create a new blog item
- Receive event and send text to Watson Explorer NLP using the REST API (this you don't actually see, it is behind the scene)
- tags have been added automatically to the new blogitem
We configured the UIMA pipeline in Watson Content Analytics to understand our domain and the dutch language.
A similar result can be obtained today for the english language using the Alchemy API's
This technique is not limited to IBM Connections items, you can imagine that IBM's Filenet (P8) content can also use this functionality.
Even Microsoft SharePoint content can benefit from this, as SharePoint has a similar event mechanism as IBM Connections.