mosesdecoder/contrib/other-builds/moses2/PhraseTable.h

42 lines
917 B
C
Raw Normal View History

2015-10-24 01:19:31 +03:00
/*
* PhraseTable.h
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#pragma once
2015-10-24 04:02:50 +03:00
#include <string>
2015-10-24 01:19:31 +03:00
#include <boost/unordered_map.hpp>
#include "TargetPhrases.h"
#include "Word.h"
2015-10-24 21:54:16 +03:00
#include "StatelessFeatureFunction.h"
2015-10-24 01:19:31 +03:00
#include "moses/Util.h"
2015-10-26 00:20:55 +03:00
class System;
2015-10-24 14:39:15 +03:00
class InputPaths;
2015-10-28 20:12:02 +03:00
class InputPath;
class Manager;
2015-10-24 01:19:31 +03:00
2015-10-24 15:31:43 +03:00
////////////////////////////////////////////////////////////////////////
2015-10-24 21:54:16 +03:00
class PhraseTable : public StatelessFeatureFunction
2015-10-24 01:19:31 +03:00
{
public:
2015-10-27 18:46:37 +03:00
PhraseTable(size_t startInd, const std::string &line);
2015-10-24 01:19:31 +03:00
virtual ~PhraseTable();
2015-10-28 19:42:12 +03:00
virtual void SetParameter(const std::string& key, const std::string& value);
virtual void Lookup(const Manager &mgr, InputPaths &inputPaths) const;
virtual const TargetPhrases *Lookup(const Manager &mgr, InputPath &inputPath) const;
2015-10-24 01:19:31 +03:00
2015-10-24 15:31:43 +03:00
void SetPtInd(size_t ind)
{ m_ptInd = ind; }
size_t GetPtInd() const
{ return m_ptInd; }
2015-10-24 01:19:31 +03:00
protected:
2015-10-24 04:02:50 +03:00
std::string m_path;
2015-10-24 15:19:42 +03:00
size_t m_ptInd;
2015-10-24 14:39:15 +03:00
2015-10-24 01:19:31 +03:00
};