Frog
csidp.h
Go to the documentation of this file.
1 /* ex: set tabstop=8 expandtab: */
2 /*
3  Copyright (c) 2006 - 2020
4  CLST - Radboud University
5  ILK - Tilburg University
6 
7  This file is part of frog:
8 
9  A Tagger-Lemmatizer-Morphological-Analyzer-Dependency-Parser for
10  several languages
11 
12  frog is free software; you can redistribute it and/or modify
13  it under the terms of the GNU General Public License as published by
14  the Free Software Foundation; either version 3 of the License, or
15  (at your option) any later version.
16 
17  frog is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with this program. If not, see <http://www.gnu.org/licenses/>.
24 
25  For questions and suggestions, see:
26  https://github.com/LanguageMachines/frog/issues
27  or send mail to:
28  lamasoftware (at ) science.ru.nl
29 
30 */
31 #ifndef CSIDP_H
32 #define CSIDP_H
33 #include "timbl/TimblAPI.h"
34 #include "frog/ckyparser.h"
35 
37 
42 class timbl_result {
43  public:
44  timbl_result( const std::string&,
45  double,
46  const Timbl::ValueDistribution* );
47  timbl_result( const std::string&,
48  double,
49  const std::vector<std::pair<std::string,double>>& );
50  std::string cls() const {
52  return _cls;
53  };
54  double confidence() const {
56  return _confidence;
57  };
58  const std::vector< std::pair<std::string,double>>& dist() const {
60  return _dist;
61  };
62 private:
63  std::string _cls;
64  double _confidence;
65  std::vector< std::pair<std::string,double>> _dist;
66 };
67 
68 
69 std::vector<parsrel> parse( const std::vector<timbl_result>& p_res,
70  const std::vector<timbl_result>& r_res,
71  const std::vector<timbl_result>& d_res,
72  size_t sent_len,
73  int maxDist,
74  TiCC::LogStream *dbg_log );
75 
76 #endif
timbl_result::confidence
double confidence() const
Definition: csidp.h:54
timbl_result::cls
std::string cls() const
Definition: csidp.h:50
parse
std::vector< parsrel > parse(const std::vector< timbl_result > &p_res, const std::vector< timbl_result > &r_res, const std::vector< timbl_result > &d_res, size_t sent_len, int maxDist, TiCC::LogStream *dbg_log)
Definition: csidp.cxx:175
ckyparser.h
timbl_result::timbl_result
timbl_result(const std::string &, double, const Timbl::ValueDistribution *)
Definition: csidp.cxx:158
timbl_result
this class stores a triple of Timbl results
Definition: csidp.h:42
timbl_result::dist
const std::vector< std::pair< std::string, double > > & dist() const
Definition: csidp.h:58