⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 textstats.h

📁 这是一款很好用的工具包
💻 H
字号:
/* * TextStats.h -- *	Text source statistics * * TextStats objects are used to pass and accumulate various  * statistics of text sources (training or test). * * Copyright (c) 1995,2005 SRI International.  All Rights Reserved. * * @(#)$Header: /home/srilm/devel/lm/src/RCS/TextStats.h,v 1.3 2006/01/05 20:21:27 stolcke Exp $ * */#ifndef _TextStats_h_#define _TextStats_h_#include <iostream>using namespace std;#include "Prob.h"class TextStats{public:    TextStats() : prob(0.0), zeroProbs(0),	numSentences(0), numWords(0), numOOVs(0) {};    void reset() { prob = 0.0, zeroProbs = 0,	numSentences = numWords = numOOVs = 0; };    TextStats &increment(const TextStats &stats);    LogP prob;    unsigned zeroProbs;    unsigned numSentences;    unsigned numWords;    unsigned numOOVs;};ostream &operator<<(ostream &, const TextStats &stats);#endif /* _TextStats_h_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -