OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BasConst.cpp
Go to the documentation of this file.
1 // //////////////////////////////////////////////////////////////////////
2 // Import section
3 // //////////////////////////////////////////////////////////////////////
4 #include <opentrep/config/opentrep-paths.hpp>
8 
9 namespace OPENTREP {
10 
11  // ////////////// OPENTREP_Service ///////////////
15  const std::string DEFAULT_OPENTREP_POR_FILEPATH (OPENTREP_POR_DATA_DIR
16  "/ori_por_public.csv");
17 
21  const std::string
22  DEFAULT_OPENTREP_XAPIAN_DB_FILEPATH ("/tmp/opentrep/traveldb");
23 
27  const std::string DEFAULT_OPENTREP_MYSQL_DB_USER ("geo");
28  const std::string DEFAULT_OPENTREP_MYSQL_DB_PASSWD ("geo");
29  const std::string DEFAULT_OPENTREP_MYSQL_DB_DBNAME ("geo_ori");
30  const std::string DEFAULT_OPENTREP_MYSQL_DB_HOST ("localhost");
31  const std::string DEFAULT_OPENTREP_MYSQL_DB_PORT ("3306");
32 
36  const std::string DEFAULT_OPENTREP_SQLITE_DB_FILEPATH (OPENTREP_POR_DATA_DIR
37  "/ori_por_public.db");
38 
42  const std::tm DEFAULT_DATE_TM =
43  boost::gregorian::to_tm (Date_T (1970, boost::gregorian::Jan, 01));
44 
48  const std::string DEFAULT_DATE_STR ("1970-01-01");
49 
50  // //////////////// Unicode (ICU) ////////////////
54  const char* K_ICU_ACCENT_REMOVAL_RULE = "NFD; [:M:] Remove; NFC;";
55 
61  "[\\u02B9] > \\u0027; [\\u002D] > \\u0020; [\\u0027] > \\u0020;";
62 
67  const char* K_ICU_PUNCTUATION_REMOVAL_RULE = "[:P:] Remove;";
68 
74  "Any-Latin; NFD; [:M:] Remove; NFC; Lower;";
75 
76 
77  // /////////////// General ////////////////
82 
87 
92 
97 
101  const Percentage_T K_DEFAULT_PAGE_RANK (0.10);
102 
108 
115 
120 
125 
131 
132  // //////////////////////////////////////////////////////////////////////
134  BlackList_T oBL;
135  oBL.insert ("City"); oBL.insert ("city");
136  oBL.insert ("Ville"); oBL.insert ("ville");
137  oBL.insert ("Stadt"); oBL.insert ("stadt");
138  oBL.insert ("Gorod"); oBL.insert ("gorod");
139  oBL.insert ("Airport"); oBL.insert ("airport");
140  oBL.insert ("Airfield"); oBL.insert ("airfield");
141  oBL.insert ("Airbase"); oBL.insert ("airbase");
142  oBL.insert ("Aeroport"); oBL.insert ("aeroport");
143  oBL.insert ("Aéroport"); oBL.insert ("aéroport");
144  oBL.insert ("Flughafen"); oBL.insert ("flughafen");
145  oBL.insert ("Flughafe"); oBL.insert ("flughafe");
146  oBL.insert ("Flughaveno"); oBL.insert ("flughaveno");
147  oBL.insert ("Lufthavn"); oBL.insert ("lufthavn");
148  oBL.insert ("Lentoasema"); oBL.insert ("lentoasema");
149  oBL.insert ("Lapangan"); oBL.insert ("lapangan");
150  oBL.insert ("Terbang"); oBL.insert ("terbang");
151  oBL.insert ("Repülőtér"); oBL.insert ("repülőtér");
152  oBL.insert ("Aerodrome"); oBL.insert ("aerodrome");
153  oBL.insert ("Aerodromo"); oBL.insert ("aerodromo");
154  oBL.insert ("Aeroporto"); oBL.insert ("aeroporto");
155  oBL.insert ("Aeropuerto"); oBL.insert ("aeropuerto");
156  oBL.insert ("Аэропорт"); oBL.insert ("аэропорт");
157  oBL.insert ("Sân"); oBL.insert ("sân");
158  oBL.insert ("Bay"); oBL.insert ("bay");
159  oBL.insert ("Quốc"); oBL.insert ("quốc");
160  oBL.insert ("Tế"); oBL.insert ("tế");
161  oBL.insert ("International"); oBL.insert ("international");
162  oBL.insert ("Internacional"); oBL.insert ("internacional");
163  oBL.insert ("Internasional"); oBL.insert ("internasional");
164  oBL.insert ("Internazionale"); oBL.insert ("internazionale");
165  oBL.insert ("Internasjonale"); oBL.insert ("internasjonale");
166  oBL.insert ("Международный"); oBL.insert ("международный");
167  oBL.insert ("Международно"); oBL.insert ("международно");
168  oBL.insert ("Lotniczy"); oBL.insert ("lotniczy");
169  oBL.insert ("Kansainvälinen"); oBL.insert ("kansainvälinen");
170  oBL.insert ("Nemzetközi"); oBL.insert ("nemzetközi");
171  oBL.insert ("Intl"); oBL.insert ("intl");
172  oBL.insert ("Saint"); oBL.insert ("saint");
173  oBL.insert ("Sankt"); oBL.insert ("sankt");
174  oBL.insert ("Municipal"); oBL.insert ("municipal");
175  oBL.insert ("County"); oBL.insert ("county");
176  oBL.insert ("Local"); oBL.insert ("local");
177  oBL.insert ("Ferry"); oBL.insert ("ferry");
178  oBL.insert ("Port"); oBL.insert ("port");
179  oBL.insert ("Harbour"); oBL.insert ("harbour");
180  oBL.insert ("Harbor"); oBL.insert ("harbor");
181  return oBL;
182  }
183 
184 }
const Percentage_T K_DEFAULT_PAGE_RANK
const NbOfErrors_T K_DEFAULT_SIZE_FOR_SPELLING_ERROR_UNIT
const char * K_ICU_PUNCTUATION_REMOVAL_RULE
Definition: BasConst.cpp:67
double Percentage_T
unsigned short NbOfMatches_T
const char * K_ICU_GENERIC_TRANSLITERATOR_RULE
Definition: BasConst.cpp:73
const std::string DEFAULT_OPENTREP_MYSQL_DB_HOST
unsigned short Weight_T
const std::string DEFAULT_OPENTREP_SQLITE_DB_FILEPATH
const std::string DEFAULT_OPENTREP_MYSQL_DB_USER
const std::string DEFAULT_OPENTREP_MYSQL_DB_DBNAME
boost::gregorian::date Date_T
const std::string DEFAULT_OPENTREP_MYSQL_DB_PORT
const char * K_ICU_QUOTATION_REMOVAL_RULE
Definition: BasConst.cpp:60
static BlackList_T createBlackList()
Definition: BasConst.cpp:133
const std::string DEFAULT_DATE_STR
unsigned short NbOfErrors_T
const Percentage_T K_DEFAULT_MODIFIED_MATCHING_PCT
const BlackList_T K_BLACK_LIST
Definition: BasConst.cpp:130
const Percentage_T K_DEFAULT_ENVELOPE_PCT
const Percentage_T K_DEFAULT_FULL_CODE_MATCH_PCT
const NbOfMatches_T K_DEFAULT_XAPIAN_MATCHING_SET_SIZE
const std::tm DEFAULT_DATE_TM
Definition: BasConst.cpp:42
const Percentage_T K_DEFAULT_ATTENUATION_FCTR
const std::string DEFAULT_OPENTREP_XAPIAN_DB_FILEPATH
const std::string DEFAULT_OPENTREP_MYSQL_DB_PASSWD
const Weight_T K_DEFAULT_INDEXING_STD_WEIGHT
const std::string DEFAULT_OPENTREP_POR_FILEPATH
const char * K_ICU_ACCENT_REMOVAL_RULE
Definition: BasConst.cpp:54
std::set< std::string > BlackList_T
const Weight_T K_DEFAULT_INDEXING_EXTRA_WEIGHT