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

📄 nbestset.h

📁 这是一款很好用的工具包
💻 H
字号:
/* * NBestSet.h -- *	Sets of N-best lists * * Copyright (c) 1998,2002 SRI International.  All Rights Reserved. * * @(#)$Header: /home/srilm/devel/lm/src/RCS/NBestSet.h,v 1.6 2006/01/05 20:21:27 stolcke Exp $ * */#ifndef _NBestSet_h_#define _NBestSet_h_#include <iostream>using namespace std;#include <string.h>#include "Boolean.h"#include "File.h"#include "Vocab.h"#include "LHash.h"#include "NBest.h"#include "RefList.h"#include "Debug.h"/* * An element of the NBest set: an NBest List and associated information */typedef struct {    const char *filename;    NBestList *nbest;} NBestSetElement;class NBestSet: public Debug{    friend class NBestSetIter;public:    NBestSet(Vocab &vocab, RefList &refs, unsigned maxNbest = 0,		    Boolean incremental = false, Boolean multiwords = false);    ~NBestSet();    Boolean read(File &file);    unsigned numElements() { return lists.numEntries(); };    Vocab &vocab;    Boolean warn;private:    unsigned maxNbest;    Boolean incremental;    Boolean multiwords;    RefList &refs;    LHash<RefString,NBestSetElement> lists;    Boolean readList(RefString id, NBestSetElement &elt);    void freeList(NBestSetElement &elt);};class NBestSetIter{public:    NBestSetIter(NBestSet &set);    void init();    NBestList *next(RefString &id);    const char *nextFile(RefString &id);private:    NBestSet &mySet;    LHashIter<RefString,NBestSetElement> myIter;    NBestSetElement *lastElt;};#endif /* _NBestSet_h_ */

⌨️ 快捷键说明

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