/****************************************************** * Presage, an extensible predictive text entry system * --------------------------------------------------- * * Copyright (C) 2008 Matteo Vescovi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * **********(*)*/ #include "defaultProfile.h" #include "dirs.h" #include const char* DefaultProfile::DEFAULT_PROFILE_FILENAME = "presage.xml"; DefaultProfile::DefaultProfile (const std::string& filename) : Profile (filename) { build_xml_document (filename); } DefaultProfile::~DefaultProfile() { // complete } void DefaultProfile::build_xml_document (const std::string& filename) { const char* xml = "" "" " " " ERROR" " " " DefaultAbbreviationExpansionPredictor DefaultSmoothedNgramPredictor UserSmoothedNgramPredictor DefaultRecencyPredictor" " " " " " ERROR" " " " 80" " " " yes" " " " " " ERROR" " " " 6" " " " no" " " " 0" " " " " " ERROR" " " " 1000" " " " 60" " " " Meritocracy" " " " " " ERROR" " " " false" " " " " " " " SmoothedNgramPredictor" " ERROR" " " pkgdatadir "/database_en.db" " " " 0.01 0.1 0.89" " false" " " " ERROR" " " " " " " " SmoothedNgramPredictor" " ERROR" " " " ${HOME}/.presage/lm.db" " " " 0.01 0.1 0.89" " true" " " " ERROR" " " " " " " " RecencyPredictor" " ERROR" " 1" " 1" " 20" " " " " " DictionaryPredictor" " /usr/share/dict/words" " " " 0.000001" " " " " " AbbreviationExpansionPredictor" " ERROR" " " pkgdatadir "/abbreviations_en.txt" " " " " " DejavuPredictor" " ERROR" " " pkgdatadir "/dejavu_memory_en.txt" " 3" " " " " " ARPAPredictor" " ERROR" " " pkgdatadir "/arpa_en.arpa" " " pkgdatadir "/arpa_en.vocab" " 100" " " " " ""; xmlProfileDoc->Parse (xml); }