public class ConceptInsights extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
static String |
ACCOUNT_ID
The Constant ACCOUNT_ID.
|
static String |
CONCEPT
The Constant CONCEPT.
|
static String |
CONCEPT_FIELDS
The Constant CONCEPT_FIELDS.
|
static String |
CONCEPT_ID
The Constant CONCEPT_ID.
|
static String |
CONCEPTS
The Constant CONCEPTS.
|
static String |
CORPUS
The Constant CORPUS.
|
static String |
CURSOR
The Constant CURSOR.
|
static String |
DOCUMENT
The Constant DOCUMENT.
|
static String |
DOCUMENT_FIELDS
The Constant DOCUMENT_FIELDS.
|
static String |
DOCUMENTS
The Constant DOCUMENTS.
|
static String |
GRAPH
The Constant GRAPH NAME.
|
static String |
IDS
The Constant IDS.
|
static String |
LEVEL
The Constant LEVEL.
|
static String |
LIMIT
The Constant LIMIT.
|
static String |
PREFIX
The Constant PREFIX.
|
static String |
QUERY
The Constant query.
|
static String |
TEXT
The Constant TEXT.
|
FORWARD_SLASH| Constructor and Description |
|---|
ConceptInsights()
Instantiates a new Concept Insights service.
|
| Modifier and Type | Method and Description |
|---|---|
Annotations |
annotateText(Map<String,Object> parameters)
Identifies concepts in a piece of text.
|
QueryConcepts |
conceptualSearch(Map<String,Object> parameters)
Performs a conceptual search within a corpus.
|
void |
createCorpus(String accountId,
Corpus corpus)
Creates an empty corpus.
|
void |
createDocument(String accountId,
String corpusName,
Document document)
Creates a document in a given corpus.
|
void |
deleteCorpus(String accountId,
String corpusName)
Deletes a corpus by ID.
|
void |
deleteDocument(String accountId,
String corpusName,
String documentName)
Deletes a document in a given corpus.
|
Accounts |
getAccountsInfo()
Retrieves the account identifiers.
|
ConceptMetadata |
getConcept(Map<String,Object> parameters)
Returns information for a specific concept node in a graph.
|
Corpus |
getCorpus(String accountId,
String corpusName)
Retrieves corpus object to a list of individual concepts.
|
CorpusProcessingState |
getCorpusProcessingState(String accountId,
String corpusName)
Gets processing state of a Corpus.
|
Concepts |
getCorpusRelatedConcepts(Map<String,Object> parameters)
Retrieves concepts that are related to an entire corpus.
|
Scores |
getCorpusRelationScores(Map<String,Object> parameters)
Returns a list of scores that denotes how related an entire corpus is to a list of individual concepts.
|
CorpusStats |
getCorpusStats(String accountId,
String corpusName)
Gets processing state of a Corpus.
|
Document |
getDocument(String accountId,
String corpusName,
String documentName)
Retrieves a document from a corpus.
|
DocumentAnnotations |
getDocumentAnnotations(String accountId,
String corpusName,
String documentName)
Retrieves conceptual view of document (including annotations).
|
DocumentProcessingStatus |
getDocumentProcessingState(String accountId,
String corpusName,
String documentName)
Retrieves processing state of document.
|
Concepts |
getDocumentRelatedConcepts(Map<String,Object> parameters)
Retrieves concepts that are related (in conceptual sense) to a given document.
|
Scores |
getDocumentRelationScores(Map<String,Object> parameters)
Retrieves concepts that are related (in conceptual sense) to a given document.
|
Concepts |
getGraphsRelatedConcepts(Map<String,Object> parameters)
Searches for graph concepts by using partial matches.
|
Scores |
getGraphsRelationScores(Map<String,Object> parameters)
Returns a list of scores that denotes how related a source concept is
to a list of individual concepts.
|
Corpora |
listCorpora()
Retrieves the available corpus objects.
|
Corpora |
listCorpora(String accountId)
Retrieves the available corpus objects associated with an account identifier.
|
Documents |
listDocuments(Map<String,Object> parameters)
Retrieves the document ids of a corpus.
|
Graphs |
listGraphs()
Retrieves the available
Graphs. |
Matches |
searchCorpusByLabel(Map<String,Object> parameters)
Searches for documents and concepts by using partial matches on the label(s) fields.
|
Matches |
searchGraphsConceptByLabel(Map<String,Object> parameters)
Searches for graph concepts by using partial matches.
|
void |
updateCorpus(String accountId,
Corpus corpus)
Updates existing corpus meta-data (access and permissions).
|
void |
updateDocument(String accountId,
String corpusName,
Document document)
Updates a document in a given corpus.
|
execute, executeRequest, executeWithoutResponse, getApiKey, getDefaultContentType, getDefaultRequestParams, getEndPoint, getHttpClient, getThreadSafeClient, setApiKey, setAuthentication, setEndPoint, setUsernameAndPassword, toStringpublic static final String ACCOUNT_ID
public static final String CONCEPT_ID
public static final String CONCEPT
public static final String CONCEPT_FIELDS
public static final String CONCEPTS
public static final String CORPUS
public static final String CURSOR
public static final String DOCUMENT
public static final String DOCUMENT_FIELDS
public static final String DOCUMENTS
public static final String GRAPH
public static final String IDS
public static final String LEVEL
public static final String LIMIT
public static final String PREFIX
public static final String QUERY
public static final String TEXT
public ConceptInsights()
public Annotations annotateText(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
graph and text are required.
Annotationspublic QueryConcepts conceptualSearch(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus and ids are required.
QueryConceptspublic void createCorpus(String accountId, Corpus corpus)
accountId - String the Account identifier,corpus - String the corpus name.public void createDocument(String accountId, String corpusName, Document document)
accountId - String the account identifier,corpusName - String the corpus name.document - Document The document to create.public void deleteCorpus(String accountId, String corpusName)
accountId - String the Account identifier.corpusName - String the corpus name.public void deleteDocument(String accountId, String corpusName, String documentName)
accountId - String the account identifier,corpusName - String the corpus name.documentName - String the document name.public Accounts getAccountsInfo()
Accountspublic ConceptMetadata getConcept(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
graph and concept are required.
ConceptMetadatapublic Corpus getCorpus(String accountId, String corpusName)
accountId - String the Account identifier.corpusName - String the corpus name.public CorpusProcessingState getCorpusProcessingState(String accountId, String corpusName)
accountId - String the account identifier,corpusName - String the corpus name.CorpusProcessingState The processing state of a given corpus.public Concepts getCorpusRelatedConcepts(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus and concepts are required.
Conceptspublic Scores getCorpusRelationScores(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus and concepts are required.
Scorespublic CorpusStats getCorpusStats(String accountId, String corpusName)
accountId - String the account identifier,corpusName - String the corpus name.CorpusStatspublic Document getDocument(String accountId, String corpusName, String documentName)
accountId - String the account identifier,corpusName - String the corpus name.documentName - String the document name.Documentpublic DocumentAnnotations getDocumentAnnotations(String accountId, String corpusName, String documentName)
accountId - String the account identifier,corpusName - String the corpus name,documentName - String the document name.DocumentAnnotationspublic DocumentProcessingStatus getDocumentProcessingState(String accountId, String corpusName, String documentName)
accountId - String the account identifier,corpusName - String the corpus name,documentName - String the document name.DocumentProcessingStatuspublic Concepts getDocumentRelatedConcepts(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus, document are required.
Conceptspublic Scores getDocumentRelationScores(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus, document and concepts are required.
Scorespublic Concepts getGraphsRelatedConcepts(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
graph are required.
Conceptspublic Scores getGraphsRelationScores(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
graph and concept or concepts are required.
Scorespublic Corpora listCorpora(String accountId)
accountId - The account identifier.Corporapublic Documents listDocuments(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
and corpus are required.
Documentspublic Matches searchCorpusByLabel(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
corpus and query are required.
Matchespublic Matches searchGraphsConceptByLabel(Map<String,Object> parameters)
parameters - The parameters to be used in the service call, account_id,
graph and query are required.
Matchespublic void updateCorpus(String accountId, Corpus corpus)
accountId - String the Account identifier.corpus - Corpus the corpus to update.Copyright © 2015. All rights reserved.