ZLStatisticsBasedMatcher::ZLStatisticsBasedMatcher(const std::string &fileName, shared_ptr<ZLLanguageDetector::LanguageInfo> info) : ZLLanguageMatcher(info) { myStatisticsPtr = ZLStatisticsXMLReader().readStatistics(fileName); if (myStatisticsPtr == 0) { //std::string strError = "Error when reading statistic from " + fileName; assert(!(myStatisticsPtr.isNull()) && "Error when reading statistic from fileName"); } }
ZLStatisticsBasedMatcher::ZLStatisticsBasedMatcher(const std::string &fileName, shared_ptr<ZLLanguageDetector::LanguageInfo> info) : ZLLanguageMatcher(info) { myStatisticsPtr = ZLStatisticsXMLReader().readStatistics(fileName); //if (myStatisticsPtr == 0) { //std::cerr << "pattern reading failed\n"; //} }