strusAnalyzer  0.17
contentStatisticsElementView.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 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  */
11 #ifndef _STRUS_ANALYZER_CONTENT_STATISTICS_ELEMENT_VIEW_HPP_INCLUDED
12 #define _STRUS_ANALYZER_CONTENT_STATISTICS_ELEMENT_VIEW_HPP_INCLUDED
14 
16 namespace strus {
18 namespace analyzer {
19 
23 {
24 public:
29  :m_type(o.m_type),m_regex(o.m_regex),m_priority(o.m_priority),m_minLen(o.m_minLen),m_maxLen(o.m_maxLen),m_tokenizer(o.m_tokenizer),m_normalizer(o.m_normalizer){}
30 
37  ContentStatisticsElementView( const std::string& type_, const std::string& regex_, int priority_, int minLen_, int maxLen_, const FunctionView& tokenizer_, const std::vector<FunctionView>& normalizer_)
38  :m_type(type_),m_regex(regex_),m_priority(priority_),m_minLen(minLen_),m_maxLen(maxLen_),m_tokenizer(tokenizer_),m_normalizer(normalizer_){}
39 
41  const std::string& type() const {return m_type;}
43  const std::string& regex() const {return m_regex;}
45  int priority() const {return m_priority;}
47  int minLen() const {return m_minLen;}
49  int maxLen() const {return m_maxLen;}
51  const FunctionView& tokenizer() const {return m_tokenizer;}
53  const std::vector<FunctionView>& normalizer() const {return m_normalizer;}
54 
55 private:
56  std::string m_type;
57  std::string m_regex;
58  int m_priority;
59  int m_minLen;
60  int m_maxLen;
61  FunctionView m_tokenizer;
62  std::vector<FunctionView> m_normalizer;
63 };
64 
65 }}//namespace
66 #endif
67 
const std::vector< FunctionView > & normalizer() const
Get the list of normalizers.
Definition: contentStatisticsElementView.hpp:53
const std::string & type() const
Get the type.
Definition: contentStatisticsElementView.hpp:41
int minLen() const
Get the priority.
Definition: contentStatisticsElementView.hpp:47
int maxLen() const
Get the priority.
Definition: contentStatisticsElementView.hpp:49
ContentStatisticsElementView(const std::string &type_, const std::string &regex_, int priority_, int minLen_, int maxLen_, const FunctionView &tokenizer_, const std::vector< FunctionView > &normalizer_)
Constructor.
Definition: contentStatisticsElementView.hpp:37
ContentStatisticsElementView(const ContentStatisticsElementView &o)
Copy constructor.
Definition: contentStatisticsElementView.hpp:28
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Structure describing the internal representation of a normalizer/tokenizer/aggregator function in the...
Definition: functionView.hpp:29
ContentStatisticsElementView()
Default constructor.
Definition: contentStatisticsElementView.hpp:26
const std::string & regex() const
Get the segmenter selection expression.
Definition: contentStatisticsElementView.hpp:43
Structure describing the internal representation of a content statistics library element.
Definition: contentStatisticsElementView.hpp:22
int priority() const
Get the priority.
Definition: contentStatisticsElementView.hpp:45
const FunctionView & tokenizer() const
Get the tokenizer.
Definition: contentStatisticsElementView.hpp:51