2011-11-06 12:31:11 +04:00
|
|
|
//
|
|
|
|
// PhraseDictionaryALSuffixArray.h
|
|
|
|
// moses
|
|
|
|
//
|
|
|
|
// Created by Hieu Hoang on 06/11/2011.
|
|
|
|
// Copyright 2011 __MyCompanyName__. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef moses_PhraseDictionaryALSuffixArray_h
|
|
|
|
#define moses_PhraseDictionaryALSuffixArray_h
|
|
|
|
|
2013-05-24 19:23:31 +04:00
|
|
|
#include "moses/TranslationModel/PhraseDictionaryMemory.h"
|
2011-11-06 12:31:11 +04:00
|
|
|
|
2013-05-29 21:16:15 +04:00
|
|
|
namespace Moses
|
|
|
|
{
|
|
|
|
|
2012-06-29 02:29:46 +04:00
|
|
|
/** Implementation of in-memory phrase table for use with Adam Lopez's suffix array.
|
|
|
|
* Does 2 things that the normal in-memory pt doesn't do:
|
|
|
|
* 1. Loads grammar for a sentence to be decoded only when the sentence is being decoded. Unload afterwards
|
|
|
|
2. Format of the pt file follows Hiero, rather than Moses
|
2013-05-29 21:16:15 +04:00
|
|
|
*/
|
2013-05-24 19:33:30 +04:00
|
|
|
class PhraseDictionaryALSuffixArray : public PhraseDictionaryMemory
|
2011-11-06 12:31:11 +04:00
|
|
|
{
|
|
|
|
public:
|
2013-05-28 16:11:37 +04:00
|
|
|
PhraseDictionaryALSuffixArray(const std::string &line);
|
2011-11-06 13:08:37 +04:00
|
|
|
void InitializeForInput(InputType const& source);
|
2013-05-28 18:38:36 +04:00
|
|
|
void CleanUpAfterSentenceProcessing(const InputType& source);
|
2011-11-06 13:08:37 +04:00
|
|
|
|
|
|
|
protected:
|
2013-05-29 21:16:15 +04:00
|
|
|
|
2011-11-06 12:35:05 +04:00
|
|
|
};
|
2013-05-29 21:16:15 +04:00
|
|
|
|
2011-11-06 12:31:11 +04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|