strus  0.17
summarizerFunctionContextInterface.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
10 #ifndef _STRUS_SUMMARIZER_EXECUTION_CONTEXT_INTERFACE_HPP_INCLUDED
11 #define _STRUS_SUMMARIZER_EXECUTION_CONTEXT_INTERFACE_HPP_INCLUDED
13 #include "strus/summaryElement.hpp"
14 #include "strus/termStatistics.hpp"
15 #include <string>
16 #include <vector>
17 
18 namespace strus
19 {
20 
22 class PostingIteratorInterface;
23 
27 {
28 public:
31 
39  virtual void addSummarizationFeature(
40  const std::string& name_,
41  PostingIteratorInterface* postingIterator_,
42  const std::vector<SummarizationVariable>& variables_,
43  double weight_,
44  const TermStatistics& stats_)=0;
45 
49  virtual void setVariableValue( const std::string& name, double value)=0;
50 
54  virtual std::vector<SummaryElement> getSummary( const Index& docno)=0;
55 
59  virtual std::string debugCall( const Index& docno)=0;
60 };
61 
62 }//namespace
63 #endif
64 
65 
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
virtual std::string debugCall(const Index &docno)=0
Get debug info dumped as string of the summarization call for one document.
virtual void setVariableValue(const std::string &name, double value)=0
Set the value of a query variable.
virtual ~SummarizerFunctionContextInterface()
Destructor.
Definition: summarizerFunctionContextInterface.hpp:30
Interface for the summarization execution context.
Definition: summarizerFunctionContextInterface.hpp:26
Object describing a variable associated to a set of postings. This variable can be used by summarizer...
Structure that represents a set of feature occurrencies (postings) as iterator.
Definition: postingIteratorInterface.hpp:20
Element of summary (result of summarization)
virtual void addSummarizationFeature(const std::string &name_, PostingIteratorInterface *postingIterator_, const std::vector< SummarizationVariable > &variables_, double weight_, const TermStatistics &stats_)=0
Add a sumarization feature that is subject of summarization to the execution context.
virtual std::vector< SummaryElement > getSummary(const Index &docno)=0
Get the summarization elements for one document.
Global term statistics, if passed down with the query.
Definition: termStatistics.hpp:16