Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

QueryAnnotation.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 
00013 //
00014 // QueryAnnotation
00015 //
00016 // 21 July 2004 -- tds
00017 //
00018 
00019 #ifndef INDRI_QUERYANNOTATION_HPP
00020 #define INDRI_QUERYANNOTATION_HPP
00021 
00022 #include "indri/EvaluatorNode.hpp"
00023 #include <string>
00024 #include <vector>
00025 #include <map>
00026 #include "indri/QuerySpec.hpp"
00027 
00028 namespace indri
00029 {
00030   namespace api 
00031   {
00032 
00033     struct QueryAnnotationNode {
00034       std::string name;
00035       std::string type;
00036       std::string queryText;
00037       std::vector<QueryAnnotationNode*> children;
00038     };
00039 
00040     class QueryAnnotation {
00041     private:
00042       QueryAnnotationNode* _queryTree;
00043       indri::infnet::EvaluatorNode::MResults _annotations;
00044       std::vector<indri::api::ScoredExtentResult> _results;
00045 
00046     public:
00047       QueryAnnotation();
00048       QueryAnnotation( indri::lang::Node* queryRoot, indri::infnet::EvaluatorNode::MResults& annotations, std::vector<indri::api::ScoredExtentResult>& results );
00049       ~QueryAnnotation();
00050 
00051       const QueryAnnotationNode* getQueryTree() const;
00052       const std::map< std::string, std::vector<indri::api::ScoredExtentResult> >& getAnnotations() const;
00053       const std::vector<indri::api::ScoredExtentResult>& getResults() const;
00054     };
00055   }
00056 }
00057 
00058 #endif // INDRI_DOCUMENTANNOTATION_HPP

Generated on Tue Jun 15 11:02:55 2010 for Lemur by doxygen 1.3.4