dca_interface  6.3.4
text_classification_results.h
Go to the documentation of this file.
1 /* IBM Source Code */
2 /* (C) Copyright IBM Corp. 2009, 2012 */
3 /* Licensed Materials - Property of IBM */
4 /* US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA Schedule Contract with IBM Corp. */
5 
6 #ifndef TEXT_CLASSIFICATION_RESULTS_H
7 #define TEXT_CLASSIFICATION_RESULTS_H
8 
15 namespace dca {
16 
17  class tc_results;
18 
19  class TextClassificationResult;
20 
30  {
31  public:
35  TextClassificationResults& operator = ( const TextClassificationResults& rhi );
36  virtual ~TextClassificationResults();
38 
56 
58  bool isCategorized() const;
64  bool contains( DCA_CATEGORY_ID_TYPE catid ) const;
71  bool byId( DCA_CATEGORY_ID_TYPE catid, TextClassificationResult& result ) const;
72 
74  PRIVATE_PTR tc_results *_p;
75  };
76 
77 }
78 
79 #endif
Single result of a text classification.
bool byId(DCA_CATEGORY_ID_TYPE catid, TextClassificationResult &result) const
If the results contain the given category the detailed result item is returned.
TextClassificationResult operator[](DCA_INDEX_TYPE index) const
Similar to at() but allows a more C++ style access.
bool isCategorized() const
Returns whether there are any results for the text classification.
TextClassificationResult at(DCA_INDEX_TYPE index) const
Returns one result of the matched results (if any) with the given index.
DCA_SIZE_TYPE size() const
Returns the number of results in the container.
bool contains(DCA_CATEGORY_ID_TYPE catid) const
Fast method to see whether the results contain a given category or not.
int DCA_CATEGORY_ID_TYPE
Type for category ids.
Definition: base_types.h:31
size_t DCA_INDEX_TYPE
Type for index access (used for arrays and collections).
Definition: base_types.h:66
Overall results of a text classification.
size_t DCA_SIZE_TYPE
Type for size (used for size of array and collections).
Definition: base_types.h:72
#define PRIVATE_PTR
Type for private pointer implementations, for internal use only.
Definition: base_types.h:83