ExtractTextAlchemyLanguage (deprecated)

The action calls the AlchemyAPI Combined Call feature and passes in text from a single page at a time. The results are saved as entities in the page's layout XML file. Use the FindExtractedText action to populate fields with results of this action.

Important: This action is deprecated, and is scheduled to be removed in the future release. To read the announcement from IBM about retirement of AlchemyAPI, see https://www.ibm.com/blogs/bluemix/2017/03/bye-bye-alchemyapi/. According to the announcement, you no longer be able to provision new AlchemyAPI instances after April 7, 2017. However, all existing instances continue to be supported by AlchemyAPI until March 7, 2018.

Syntax

bool ExtractTextAlchemyLanguage (string options)

Parameters

  • entity
  • keyword
  • taxonomy
  • concept
  • relation
  • doc-sentiment
  • doc-emotion
  • dates

Variables

Timeout
The default timeout is 100 seconds. You can specify the timeout by saving a page variable that is called alchTimeout and specifying the time in milliseconds.
Save Response
The response from AlchemyAPI can be saved by setting the variable alchSaveResponse to 1.

Returns

True if the layout is loaded and there are no errors. Otherwise, False.

Level

Document or page.

Details

Important: You must have an AlchemyAPI license to use this action. This license is obtained by creating an account on bluemix.net and adding the AlchemyAPI service to a workspace. The URL and key are shown on the Service Credentials page. Enter the credentials in Datacap Application Manager:
  • Save the URL in your application's general section in a variable called AlchemyApiUrl.
    Note: The URL must end in /calls/. If the AlchemyApiUrl is not updated, the default URL is https://gateway-a.watsonplatform.net/calls/
  • Save the license key in your application's advanced section in a variable called AlchemyApiKey.
Entities are named using the format AlchemyFeature.ResponseNode. For example, an entity result for a person will have the name Entity.Person. Most entity fields will be named using the node returned by AlchemyAPI. Nested responses are flattened to one level. For example, the disambiguated sub type will be named subTypes and the results will be saved as a comma-separated list.

When called on the document or page, the text of the layout XML file specified in the calling object's layout variable will be sent to AlchemyAPI.

The results will be saved to the entities list of the page in the layout XML file.

Example

Recognize()
AnalyzeLayout()
ExtractTextAlchemyLanguage()
FindExtractedText()