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

📄 wordlattice.h.svn-base

📁 moses开源的机器翻译系统
💻 SVN-BASE
字号:
#ifndef WORDLATTICE_H_#define WORDLATTICE_H_#include <vector>#include "ConfusionNet.h"/** General word lattice */class WordLattice: public ConfusionNet {private:	std::vector<std::vector<size_t> > next_nodes;	std::vector<std::vector<int> > distances;		 public:	WordLattice();	size_t GetColumnIncrement(size_t ic, size_t j) const;	void Print(std::ostream&) const;	/** Get shortest path between two nodes	 */	virtual int ComputeDistortionDistance(const WordsRange& prev, const WordsRange& current) const;	// is it possible to get from the edge of the previous word range to the current word range	virtual bool CanIGetFromAToB(size_t start, size_t end) const;		int Read(std::istream& in,const std::vector<FactorType>& factorOrder);	/** Convert internal representation into an edge matrix	 * @note edges[1][2] means there is an edge from 1 to 2	 */	void GetAsEdgeMatrix(std::vector<std::vector<bool> >& edges) const;};#endif

⌨️ 快捷键说明

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