00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INDRI_PRIORNODE_HPP
00020 #define INDRI_PRIORNODE_HPP
00021
00022 #include "indri/BeliefNode.hpp"
00023 #include "indri/FieldIteratorNode.hpp"
00024 #include "indri/QuerySpec.hpp"
00025
00026 class PriorNode : public BeliefNode {
00027 private:
00028 FieldIteratorNode* _field;
00029 std::map<int, indri::lang::PriorNode::tuple_type> _table;
00030 greedy_vector<ScoredExtentResult> _scores;
00031 std::string _name;
00032
00033 public:
00034 PriorNode( const std::string& name, FieldIteratorNode* field, const std::map<int, indri::lang::PriorNode::tuple_type>& table );
00035 ~PriorNode();
00036
00037 int nextCandidateDocument();
00038 bool hasMatch( int documentID );
00039 const greedy_vector<ScoredExtentResult>& score( int documentID, int begin, int end, int documentLength );
00040 void annotate( class Annotator& annotator, int documentID, int begin, int end );
00041 double maximumScore();
00042 double maximumBackgroundScore();
00043 const std::string& getName() const;
00044 };
00045
00046 #endif // INDRI_PRIORNODE_HPP
00047