2 * Copyright (C) 2004-2006 Felipe Sánchez-Martínez
3 * Copyright (C) 2006 Universitat d'Alacant
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21 * Utility functions. (header file)
23 * @author Felipe Sánchez-Martínez - fsanchez@dlsi.ua.es
26 #ifndef __SMOOTHUTILS_H
27 #define __SMOOTHUTILS_H
30 #include <apertium/TaggerData.H>
36 double static lambda(double count);
37 map<int, double> static prob_amb_class_from_tag(TaggerData& tagger_data,
39 map<int, double> &prob_ambclass);
42 void static calculate_smoothed_parameters(TaggerData& tagger_data,
43 map<int, double> &tags_count,
44 map<int, map<int, double> > &tags_pairs,
45 map<int, double> &ambclass_count,
46 map<int, map<int, double> > &emis,
47 map<int, double> &tags_count_for_emis,
48 double corpus_length);