public class ConceptInsights extends WatsonService
Modifier and Type | Field and Description |
---|---|
static String |
CONCEPT
The Constant CONCEPT.
|
static String |
CONCEPT_FIELDS
The Constant CONCEPT_FIELDS.
|
static String |
CONCEPTS
The Constant CONCEPTS.
|
static String |
CURSOR
The Constant CURSOR.
|
static String |
DOCUMENT_FIELDS
The Constant DOCUMENT_FIELDS.
|
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.
|
MESSAGE_CODE, MESSAGE_ERROR, VERSION
Constructor and Description |
---|
ConceptInsights()
Instantiates a new Concept Insights service.
|
Modifier and Type | Method and Description |
---|---|
ServiceCall<Annotations> |
annotateText(Graph graph,
String text)
Identifies concepts in a piece of text.
|
ServiceCall<QueryConcepts> |
conceptualSearch(Corpus corpus,
Map<String,Object> parameters)
Performs a conceptual search within a corpus.
|
ServiceCall<Void> |
createCorpus(Corpus corpus)
Creates an empty corpus.
|
ServiceCall<Void> |
createDocument(Document document)
Creates a document in a given corpus.
|
ServiceCall<Void> |
deleteCorpus(Corpus corpus)
Deletes a corpus by ID.
|
ServiceCall<Void> |
deleteDocument(Document document)
Deletes a document in a given corpus.
|
ServiceCall<Accounts> |
getAccountsInfo()
Retrieves the account identifiers.
|
ServiceCall<ConceptMetadata> |
getConcept(Concept concept)
Returns information for a specific concept node in a graph.
|
ServiceCall<Concepts> |
getConceptRelatedConcepts(Concept concept,
Map<String,Object> parameters)
Searches for graph concepts from a Concept by using partial matches.
|
ServiceCall<Corpus> |
getCorpus(Corpus corpus)
Retrieves corpus object to a list of individual concepts.
|
ServiceCall<CorpusProcessingState> |
getCorpusProcessingState(Corpus corpus)
Gets processing state of a Corpus.
|
ServiceCall<Concepts> |
getCorpusRelatedConcepts(Corpus corpus,
Map<String,Object> parameters)
Retrieves concepts that are related to an entire corpus.
|
ServiceCall<Scores> |
getCorpusRelationScores(Corpus corpus,
List<Concept> concepts)
Returns a list of scores that denotes how related an entire corpus is to a list of individual
concepts.
|
ServiceCall<CorpusStats> |
getCorpusStats(Corpus corpus)
Gets processing state of a Corpus.
|
ServiceCall<Document> |
getDocument(Document document)
Retrieves a document from a corpus.
|
ServiceCall<DocumentAnnotations> |
getDocumentAnnotations(Document document)
Retrieves conceptual view of document (including annotations).
|
ServiceCall<DocumentProcessingStatus> |
getDocumentProcessingState(Document document)
Retrieves processing state of document.
|
ServiceCall<Concepts> |
getDocumentRelatedConcepts(Document document,
Map<String,Object> parameters)
Retrieves concepts that are related (in conceptual sense) to a given document.
|
ServiceCall<Scores> |
getDocumentRelationScores(Document document,
List<Concept> concepts)
Returns a list of scores that denotes how related a document is to a list of concepts.
|
String |
getFirstAccountId()
Returns the first account id.
|
ServiceCall<Concepts> |
getGraphRelatedConcepts(Graph graph,
List<Concept> concepts,
Map<String,Object> parameters)
Searches for graph concepts by using partial matches.
|
ServiceCall<Scores> |
getGraphRelationScores(Concept concept,
List<String> concepts)
Returns a list of scores that denotes how related a source concept is to a list of individual
concepts.
|
ServiceCall<Corpora> |
listCorpora()
Retrieves the available corpus objects.
|
ServiceCall<Corpora> |
listCorpora(String accountId)
Retrieves the available corpus objects associated with an account identifier.
|
ServiceCall<Documents> |
listDocuments(Corpus corpus)
Retrieves the documents of a given corpus.
|
ServiceCall<Documents> |
listDocuments(Corpus corpus,
Map<String,Object> parameters)
Retrieves the documents of a given corpus.
|
ServiceCall<Graphs> |
listGraphs()
Retrieves the available
Graphs . |
ServiceCall<Matches> |
searchCorpusByLabel(Corpus corpus,
Map<String,Object> parameters)
Searches for documents and concepts by using partial matches on the label(s) fields.
|
ServiceCall<Matches> |
searchGraphsConceptByLabel(Graph graph,
Map<String,Object> parameters)
Searches for graph concepts by using partial matches.
|
ServiceCall<Void> |
updateCorpus(Corpus corpus)
Updates existing corpus meta-data (access and permissions).
|
ServiceCall<Void> |
updateDocument(Document document)
Updates a document in a given corpus.
|
configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getToken, processServiceCall, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toString
public static final String CONCEPT
public static final String CONCEPT_FIELDS
public static final String CONCEPTS
public static final String CURSOR
public static final String DOCUMENT_FIELDS
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 ServiceCall<Annotations> annotateText(Graph graph, String text)
graph
- - The graph object.text
- - The text to annotate.Annotations
public ServiceCall<QueryConcepts> conceptualSearch(Corpus corpus, Map<String,Object> parameters)
corpus
- the corpusparameters
- The parameters to be used in the service call ids is required.
QueryConcepts
public ServiceCall<Void> createCorpus(Corpus corpus)
corpus
- Corpus the corpus object.public ServiceCall<Void> createDocument(Document document)
document
- Document
The document to create.public ServiceCall<Void> deleteCorpus(Corpus corpus)
corpus
- Corpus the corpus object.public ServiceCall<Void> deleteDocument(Document document)
document
- Document the document.public ServiceCall<Accounts> getAccountsInfo()
Accounts
public ServiceCall<ConceptMetadata> getConcept(Concept concept)
concept
- Concept the concept object.ConceptMetadata
public ServiceCall<Concepts> getConceptRelatedConcepts(Concept concept, Map<String,Object> parameters)
concept
- the conceptparameters
- The parameters to be used in the service call.
Concepts
public ServiceCall<Corpus> getCorpus(Corpus corpus)
corpus
- Corpus the corpus object.public ServiceCall<CorpusProcessingState> getCorpusProcessingState(Corpus corpus)
corpus
- Corpus the corpus object.CorpusProcessingState
The processing state of a given corpus.public ServiceCall<Concepts> getCorpusRelatedConcepts(Corpus corpus, Map<String,Object> parameters)
corpus
- the corpusparameters
- The parameters to be used in the service call.
Concepts
public ServiceCall<Scores> getCorpusRelationScores(Corpus corpus, List<Concept> concepts)
corpus
- The corpus objectconcepts
- Array of concept IDs, each identifying a conceptScores
public ServiceCall<CorpusStats> getCorpusStats(Corpus corpus)
corpus
- The corpus objectCorpusStats
public ServiceCall<Document> getDocument(Document document)
document
- Document the document object,Document
public ServiceCall<DocumentAnnotations> getDocumentAnnotations(Document document)
document
- Document the document object,DocumentAnnotations
public ServiceCall<DocumentProcessingStatus> getDocumentProcessingState(Document document)
document
- Document the document object,DocumentProcessingStatus
public ServiceCall<Concepts> getDocumentRelatedConcepts(Document document, Map<String,Object> parameters)
document
- the documentparameters
- The parameters to be used in the service call.
Concepts
public ServiceCall<Scores> getDocumentRelationScores(Document document, List<Concept> concepts)
document
- Document the document object,concepts
- the conceptsScores
public String getFirstAccountId()
public ServiceCall<Concepts> getGraphRelatedConcepts(Graph graph, List<Concept> concepts, Map<String,Object> parameters)
graph
- the graphconcepts
- the conceptsparameters
- The parameters to be used in the service call, graph and concepts are
required.
Concepts
public ServiceCall<Scores> getGraphRelationScores(Concept concept, List<String> concepts)
concept
- Concept the concept object,concepts
- Array of concept IDs, each identifying a concept.Scores
public ServiceCall<Corpora> listCorpora()
Corpora
public ServiceCall<Corpora> listCorpora(String accountId)
accountId
- The account identifier.Corpora
public ServiceCall<Documents> listDocuments(Corpus corpus)
corpus
- the corpusDocuments
public ServiceCall<Documents> listDocuments(Corpus corpus, Map<String,Object> parameters)
corpus
- the corpusparameters
- The parameters to be used in the service call.
Documents
public ServiceCall<Graphs> listGraphs()
Graphs
.Graphs
public ServiceCall<Matches> searchCorpusByLabel(Corpus corpus, Map<String,Object> parameters)
corpus
- the corpusparameters
- The parameters to be used in the service call query is required.
Matches
public ServiceCall<Matches> searchGraphsConceptByLabel(Graph graph, Map<String,Object> parameters)
graph
- the graphparameters
- The parameters to be used in the service call, account_id, graph and query
are required.
Matches
public ServiceCall<Void> updateCorpus(Corpus corpus)
corpus
- Corpus
the corpus to update.public ServiceCall<Void> updateDocument(Document document)
document
- Document
The document to update.Copyright © 2015–2016. All rights reserved.