mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-25 04:43:03 +03:00
CreateFromString no longer requires factorDelimiter
This commit is contained in:
parent
c4ca243b7a
commit
bdf8d1a405
@ -323,9 +323,6 @@ void PhraseDictionaryMultiModel::SetTemporaryMultiModelWeightsVector(std::vector
|
||||
vector<float> PhraseDictionaryMultiModel::MinimizePerplexity(vector<pair<string, string> > &phrase_pair_vector)
|
||||
{
|
||||
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
const string& factorDelimiter = staticData.GetFactorDelimiter();
|
||||
|
||||
map<pair<string, string>, size_t> phrase_pair_map;
|
||||
|
||||
for ( vector<pair<string, string> >::const_iterator iter = phrase_pair_vector.begin(); iter != phrase_pair_vector.end(); ++iter ) {
|
||||
@ -344,7 +341,7 @@ vector<float> PhraseDictionaryMultiModel::MinimizePerplexity(vector<pair<string,
|
||||
map<string,multiModelStatistics*>* allStats = new(map<string,multiModelStatistics*>);
|
||||
|
||||
Phrase sourcePhrase(0);
|
||||
sourcePhrase.CreateFromString(Input, m_input, source_string, factorDelimiter, NULL);
|
||||
sourcePhrase.CreateFromString(Input, m_input, source_string, NULL);
|
||||
|
||||
CollectSufficientStatistics(sourcePhrase, allStats); //optimization potential: only call this once per source phrase
|
||||
|
||||
|
@ -489,9 +489,6 @@ void PhraseDictionaryMultiModelCounts::LoadLexicalTable( string &fileName, lexic
|
||||
vector<float> PhraseDictionaryMultiModelCounts::MinimizePerplexity(vector<pair<string, string> > &phrase_pair_vector)
|
||||
{
|
||||
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
const string& factorDelimiter = staticData.GetFactorDelimiter();
|
||||
|
||||
map<pair<string, string>, size_t> phrase_pair_map;
|
||||
|
||||
for ( vector<pair<string, string> >::const_iterator iter = phrase_pair_vector.begin(); iter != phrase_pair_vector.end(); ++iter ) {
|
||||
@ -510,7 +507,7 @@ vector<float> PhraseDictionaryMultiModelCounts::MinimizePerplexity(vector<pair<s
|
||||
map<string,multiModelCountsStatistics*>* allStats = new(map<string,multiModelCountsStatistics*>);
|
||||
|
||||
Phrase sourcePhrase(0);
|
||||
sourcePhrase.CreateFromString(Input, m_input, source_string, factorDelimiter, NULL);
|
||||
sourcePhrase.CreateFromString(Input, m_input, source_string, NULL);
|
||||
|
||||
CollectSufficientStatistics(sourcePhrase, fs, allStats); //optimization potential: only call this once per source phrase
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user