Watson Developer Cloud Unity SDK  1.0.0
The Unity SDK uses the Watson Developer Cloud services, a collection of REST APIs and SDKs that use cognitive computing to solve complex problems.
IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI Class Reference

This class wraps the Alchemy API Services. Alchemy Language AlchemyData News More...

Inheritance diagram for IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI:
IBM.Watson.DeveloperCloud.Services.IWatsonService

Classes

class  CombinedCallRequest
 Combined call request. More...
 
class  DetectFeedsRequest
 Detect feeds request. More...
 
class  GetAuthorsRequest
 Get authors request. More...
 
class  GetDatesRequest
 Get dates request. More...
 
class  GetEmotionsRequest
 Get emotions request. More...
 
class  GetEntitiesRequest
 Get entities request. More...
 
class  GetKeywordsRequest
 Get keywords request. More...
 
class  GetLanguagesRequest
 Get languages request. More...
 
class  GetMicroformatsRequest
 Get microformats request. More...
 
class  GetNewsRequest
 Get News request. More...
 
class  GetPublicationDateRequest
 Get publication date request. More...
 
class  GetRankedConceptsRequest
 Get ranked concepts request. More...
 
class  GetRankedTaxomomyRequest
 Get ranked taxomomy request. More...
 
class  GetRelationsRequest
 Get relations request. More...
 
class  GetTargetedSentimentRequest
 Get targeted sentiment request. More...
 
class  GetTextRequest
 Get text request. More...
 
class  GetTextSentimentRequest
 Get text sentiment request. More...
 
class  GetTitleRequest
 Get title request. More...
 

Public Member Functions

 AlchemyAPI (Credentials credentials)
 
delegate void OnGetAuthors (AuthorsData authorExtractionData, string data)
 On get authors delegate. More...
 
bool GetAuthors (OnGetAuthors callback, string source, string customData=default(string))
 Extracts authors from a source. More...
 
delegate void OnGetRankedConcepts (ConceptsData conceptExtractionData, string data)
 On get ranked concepts delegate. More...
 
bool GetRankedConcepts (OnGetRankedConcepts callback, string source, int maxRetrieve=8, bool includeKnowledgeGraph=false, bool includeLinkedData=true, bool includeSourceText=false, string customData=default(string))
 Extracts concepts from a source. More...
 
delegate void OnGetDates (DateData dateData, string data)
 On get dates delegate. More...
 
bool GetDates (OnGetDates callback, string source, string anchorDate=default(string), bool includeSourceText=false, string customData=default(string))
 Extracts dates from a source. More...
 
delegate void OnGetEmotions (EmotionData emotionData, string data)
 On get emotions delegate. More...
 
bool GetEmotions (OnGetEmotions callback, string source, bool includeSourceText=false, string customData=default(string))
 Gets the emotions from a source. More...
 
delegate void OnGetEntities (EntityData entityData, string data)
 On get entities delegate. More...
 
bool ExtractEntities (OnGetEntities callback, string source, int maxRetrieve=50, bool resolveCoreference=true, bool disambiguate=true, bool includeKnowledgeGraph=false, bool includeLinkedData=true, bool includeQuotations=false, bool analyzeSentiment=false, bool includeSourceText=false, bool extractStructuredEntities=true, string customData=default(string))
 Extracts the entities from a source. More...
 
delegate void OnDetectFeeds (FeedData feedData, string data)
 On detect feeds delegate. More...
 
bool DetectFeeds (OnDetectFeeds callback, string source, string customData=default(string))
 Detects RSS feeds in a source. More...
 
delegate void OnGetKeywords (KeywordData keywordData, string data)
 On get keywords delegate. More...
 
bool ExtractKeywords (OnGetKeywords callback, string source, int maxRetrieve=50, bool includeKnowledgeGraph=false, bool analyzeSentiment=false, bool includeSourceText=false, string customData=default(string))
 Extracts the keywords from a source. More...
 
delegate void OnGetLanguages (LanguageData languageData, string data)
 On get languages. More...
 
bool GetLanguages (OnGetLanguages callback, string source, bool includeSourceText=false, string customData=default(string))
 Extracts the language a source is written. More...
 
delegate void OnGetMicroformats (MicroformatData microformatData, string data)
 On get microformats. More...
 
bool GetMicroformats (OnGetMicroformats callback, string source, string customData=default(string))
 Extracts microformats from a URL source. More...
 
delegate void OnGetPublicationDate (PubDateData pubDateData, string data)
 On get publication date delegate. More...
 
bool GetPublicationDate (OnGetPublicationDate callback, string source, string customData=default(string))
 Extracts the publication date from a source. More...
 
delegate void OnGetRelations (RelationsData relationData, string data)
 On get relations delegate. More...
 
bool GetRelations (OnGetRelations callback, string source, int maxRetrieve=50, bool includeKeywords=false, bool includeEntities=false, bool requireEntities=false, bool resolveCoreferences=true, bool disambiguateEntities=true, bool includeKnowledgeGraph=false, bool includeLinkedData=true, bool analyzeSentiment=false, bool excludeEntitiesInSentiment=false, bool includeSourceText=false, string customData=default(string))
 Extracts the relations from a source. More...
 
delegate void OnGetTextSentiment (SentimentData sentimentData, string data)
 On get text sentiment delegate. More...
 
bool GetTextSentiment (OnGetTextSentiment callback, string source, bool includeSourceText=false, string customData=default(string))
 Extracts the sentiment from a source. More...
 
delegate void OnGetTargetedSentiment (TargetedSentimentData targetedSentimentData, string data)
 On get targeted sentiment delegate. More...
 
bool GetTargetedSentiment (OnGetTargetedSentiment callback, string source, string targets, bool includeSourceText=false, string customData=default(string))
 Extracts targeted sentiment from a source. More...
 
delegate void OnGetRankedTaxonomy (TaxonomyData taxonomyData, string data)
 On get ranked taxonomy delegate. More...
 
bool GetRankedTaxonomy (OnGetRankedTaxonomy callback, string source, bool includeSourceText=false, string customData=default(string))
 Extracts the ranked taxonomy from a source. More...
 
delegate void OnGetText (TextData textData, string data)
 On get text delegate. More...
 
bool GetText (OnGetText callback, string source, bool extractLinks=false, bool useMetadata=true, string customData=default(string))
 Extracts text from a source. More...
 
bool GetRawText (OnGetText callback, string source, string customData=default(string))
 Gets raw text from a source. More...
 
delegate void OnGetTitle (Title titleData, string data)
 On get title delegate. More...
 
bool GetTitle (OnGetTitle callback, string source, bool useMetadata=true, string customData=default(string))
 Extracts the title from a source. More...
 
delegate void OnGetCombinedData (CombinedCallData combinedData, string data)
 On get combined data delegate. More...
 
bool GetCombinedData (OnGetCombinedData callback, string source, bool includeSourceText=false, bool extractAuthors=false, bool extractConcepts=true, bool extractDates=false, bool extractDocEmotion=false, bool extractEntities=true, bool extractFeeds=false, bool extractKeywords=true, bool extractPubDate=false, bool extractRelations=false, bool extractDocSentiment=false, bool extractTaxonomy=true, bool extractTitle=false, bool extractPageImage=false, bool extractImageKeywords=false, string customData=default(string))
 Access multiple services in one call. More...
 
delegate void OnGetNews (NewsResponse newsData, string data)
 On get news delegate. More...
 
bool GetNews (OnGetNews callback, string[] returnFields=default(string[]), Dictionary< string, string > queryFields=null, string startDate="now-1d", string endDate="now", int maxResults=10, string timeSlice=default(string), string customData=default(string))
 Gets news. More...
 
string GetServiceID ()
 <exclude> More...
 

Properties

string Url [get, set]
 Gets and sets the endpoint URL for the service. More...
 
Credentials Credentials [get, set]
 Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined. More...
 

Detailed Description

This class wraps the Alchemy API Services. Alchemy Language AlchemyData News

Constructor & Destructor Documentation

IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.AlchemyAPI ( Credentials  credentials)
inline

Member Function Documentation

bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.DetectFeeds ( OnDetectFeeds  callback,
string  source,
string  customData = default(string) 
)
inline

Detects RSS feeds in a source.

Returns
true, if feeds was detected, false otherwise.
Parameters
callbackCallback.
sourceURL to detect feeds.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.ExtractEntities ( OnGetEntities  callback,
string  source,
int  maxRetrieve = 50,
bool  resolveCoreference = true,
bool  disambiguate = true,
bool  includeKnowledgeGraph = false,
bool  includeLinkedData = true,
bool  includeQuotations = false,
bool  analyzeSentiment = false,
bool  includeSourceText = false,
bool  extractStructuredEntities = true,
string  customData = default(string) 
)
inline

Extracts the entities from a source.

Returns
true, if entities was extracted, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
maxRetrieveMaximum results retreived.
resolveCoreferenceIf set to true resolve coreference.
disambiguateIf set to true disambiguate.
includeKnowledgeGraphIf set to true include knowledge graph.
includeLinkedDataIf set to true include linked data.
includeQuotationsIf set to true include quotations.
analyzeSentimentIf set to true analyze sentiment.
includeSourceTextIf set to true include source text.
extractStructuredEntitiesIf set to true extract structured entities.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.ExtractKeywords ( OnGetKeywords  callback,
string  source,
int  maxRetrieve = 50,
bool  includeKnowledgeGraph = false,
bool  analyzeSentiment = false,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts the keywords from a source.

Returns
true, if keywords was extracted, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
maxRetrieveMaximum results retreived.
includeKnowledgeGraphIf set to true include knowledge graph.
analyzeSentimentIf set to true analyze sentiment.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetAuthors ( OnGetAuthors  callback,
string  source,
string  customData = default(string) 
)
inline

Extracts authors from a source.

Returns
true, if authors was gotten, false otherwise.
Parameters
callbackCallback.
sourceURL or HTML source.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetCombinedData ( OnGetCombinedData  callback,
string  source,
bool  includeSourceText = false,
bool  extractAuthors = false,
bool  extractConcepts = true,
bool  extractDates = false,
bool  extractDocEmotion = false,
bool  extractEntities = true,
bool  extractFeeds = false,
bool  extractKeywords = true,
bool  extractPubDate = false,
bool  extractRelations = false,
bool  extractDocSentiment = false,
bool  extractTaxonomy = true,
bool  extractTitle = false,
bool  extractPageImage = false,
bool  extractImageKeywords = false,
string  customData = default(string) 
)
inline

Access multiple services in one call.

Returns
true, if combined data was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
includeSourceTextIf set to true include source text.
extractAuthorsIf set to true extract authors.
extractConceptsIf set to true extract concepts.
extractDatesIf set to true extract dates.
extractDocEmotionIf set to true extract document emotion.
extractEntitiesIf set to true extract entities.
extractFeedsIf set to true extract feeds.
extractKeywordsIf set to true extract keywords.
extractPubDateIf set to true extract pub date.
extractRelationsIf set to true extract relations.
extractDocSentimentIf set to true extract document sentiment.
extractTaxonomyIf set to true extract taxonomy.
extractTitleIf set to true extract title.
extractPageImageIf set to true extract page image.
extractImageKeywordsIf set to true extract image keywords.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetDates ( OnGetDates  callback,
string  source,
string  anchorDate = default(string),
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts dates from a source.

Returns
true, if dates was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
anchorDateAnchor date in the yyyy-mm-dd hh:mm:ss format. If this is not set, anchor date is set to today's date and time.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetEmotions ( OnGetEmotions  callback,
string  source,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Gets the emotions from a source.

Returns
true, if emotions was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetLanguages ( OnGetLanguages  callback,
string  source,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts the language a source is written.

Returns
true, if languages was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetMicroformats ( OnGetMicroformats  callback,
string  source,
string  customData = default(string) 
)
inline

Extracts microformats from a URL source.

Returns
true, if microformats was gotten, false otherwise.
Parameters
callbackCallback.
sourceURL to extract microformats from.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetNews ( OnGetNews  callback,
string[]  returnFields = default(string[]),
Dictionary< string, string >  queryFields = null,
string  startDate = "now-1d",
string  endDate = "now",
int  maxResults = 10,
string  timeSlice = default(string),
string  customData = default(string) 
)
inline

Gets news.

Returns
true, if news was gotten, false otherwise.
Parameters
callbackCallback.
returnFieldsFields returned.
queryFieldsValues for each field.
startDateDate to start the query.
endDateDate to end the query.
maxResultsMaximum number of results.
timeSlicethe duration (in seconds) of each time slice. a human readable duration is also acceptable e.g. '1d', '4h', '1M', etc. If set, this parameter causes the query engine to return a time series representing the count in each slice of time. If omitted, the query engine returns the total count over the time duration.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetPublicationDate ( OnGetPublicationDate  callback,
string  source,
string  customData = default(string) 
)
inline

Extracts the publication date from a source.

Returns
true, if publication date was gotten, false otherwise.
Parameters
callbackCallback.
sourceURL or HTML sources.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetRankedConcepts ( OnGetRankedConcepts  callback,
string  source,
int  maxRetrieve = 8,
bool  includeKnowledgeGraph = false,
bool  includeLinkedData = true,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts concepts from a source.

Returns
true, if ranked concepts was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text Source.
maxRetrieveMaximum results retreived.
includeKnowledgeGraphIf set to true include knowledge graph.
includeLinkedDataIf set to true include linked data.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetRankedTaxonomy ( OnGetRankedTaxonomy  callback,
string  source,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts the ranked taxonomy from a source.

Returns
true, if ranked taxonomy was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetRawText ( OnGetText  callback,
string  source,
string  customData = default(string) 
)
inline

Gets raw text from a source.

Returns
true, if raw text was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML or URL source.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetRelations ( OnGetRelations  callback,
string  source,
int  maxRetrieve = 50,
bool  includeKeywords = false,
bool  includeEntities = false,
bool  requireEntities = false,
bool  resolveCoreferences = true,
bool  disambiguateEntities = true,
bool  includeKnowledgeGraph = false,
bool  includeLinkedData = true,
bool  analyzeSentiment = false,
bool  excludeEntitiesInSentiment = false,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts the relations from a source.

Returns
true, if relations was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
maxRetrieveMax retrieve.
includeKeywordsIf set to true include keywords.
includeEntitiesIf set to true include entities.
requireEntitiesIf set to true require entities.
resolveCoreferencesIf set to true resolve coreferences.
disambiguateEntitiesIf set to true disambiguate entities.
includeKnowledgeGraphIf set to true include knowledge graph.
includeLinkedDataIf set to true include linked data.
analyzeSentimentIf set to true analyze sentiment.
excludeEntitiesInSentimentIf set to true exclude entities in sentiment.
includeSourceTextIf set to true include source text.
customDataCustom data.
string IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetServiceID ( )
inline
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetTargetedSentiment ( OnGetTargetedSentiment  callback,
string  source,
string  targets,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts targeted sentiment from a source.

Returns
true, if targeted sentiment was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
targetsTargets.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetText ( OnGetText  callback,
string  source,
bool  extractLinks = false,
bool  useMetadata = true,
string  customData = default(string) 
)
inline

Extracts text from a source.

Returns
true, if text was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML or URL source.
extractLinksIf set to true extract links.
useMetadataIf set to true use metadata.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetTextSentiment ( OnGetTextSentiment  callback,
string  source,
bool  includeSourceText = false,
string  customData = default(string) 
)
inline

Extracts the sentiment from a source.

Returns
true, if text sentiment was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML, URL or Text source.
includeSourceTextIf set to true include source text.
customDataCustom data.
bool IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.GetTitle ( OnGetTitle  callback,
string  source,
bool  useMetadata = true,
string  customData = default(string) 
)
inline

Extracts the title from a source.

Returns
true, if title was gotten, false otherwise.
Parameters
callbackCallback.
sourceHTML or URL source.
useMetadataIf set to true use metadata.
customDataCustom data.
delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnDetectFeeds ( FeedData  feedData,
string  data 
)

On detect feeds delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetAuthors ( AuthorsData  authorExtractionData,
string  data 
)

On get authors delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetCombinedData ( CombinedCallData  combinedData,
string  data 
)

On get combined data delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetDates ( DateData  dateData,
string  data 
)

On get dates delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetEmotions ( EmotionData  emotionData,
string  data 
)

On get emotions delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetEntities ( EntityData  entityData,
string  data 
)

On get entities delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetKeywords ( KeywordData  keywordData,
string  data 
)

On get keywords delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetLanguages ( LanguageData  languageData,
string  data 
)

On get languages.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetMicroformats ( MicroformatData  microformatData,
string  data 
)

On get microformats.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetNews ( NewsResponse  newsData,
string  data 
)

On get news delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetPublicationDate ( PubDateData  pubDateData,
string  data 
)

On get publication date delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetRankedConcepts ( ConceptsData  conceptExtractionData,
string  data 
)

On get ranked concepts delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetRankedTaxonomy ( TaxonomyData  taxonomyData,
string  data 
)

On get ranked taxonomy delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetRelations ( RelationsData  relationData,
string  data 
)

On get relations delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetTargetedSentiment ( TargetedSentimentData  targetedSentimentData,
string  data 
)

On get targeted sentiment delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetText ( TextData  textData,
string  data 
)

On get text delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetTextSentiment ( SentimentData  sentimentData,
string  data 
)

On get text sentiment delegate.

delegate void IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.OnGetTitle ( Title  titleData,
string  data 
)

On get title delegate.

Property Documentation

Credentials IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.Credentials
getset

Gets and sets the credentials of the service. Replace the default endpoint if endpoint is defined.

string IBM.Watson.DeveloperCloud.Services.AlchemyAPI.v1.AlchemyAPI.Url
getset

Gets and sets the endpoint URL for the service.


The documentation for this class was generated from the following file: