Skip to content

Commit

Permalink
SoftSourceSyntacticConstraintsFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Huck committed Aug 8, 2014
1 parent 0d756c1 commit 856e20b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 0 additions & 2 deletions moses/FF/SoftSourceSyntacticConstraintsFeature.cpp
Expand Up @@ -55,8 +55,6 @@ void SoftSourceSyntacticConstraintsFeature::Load()
if (!m_targetSourceLHSJointCountFile.empty()) {
LoadTargetSourceLeftHandSideJointCountFile();
}
m_sparseFeatureKeyCache.resize(m_sourceLabelsByIndex.size()*m_sourceLabelsByIndex.size());
m_sparseFeatureKeyCacheIsValid.resize(m_sourceLabelsByIndex.size()*m_sourceLabelsByIndex.size(), false);
}

void SoftSourceSyntacticConstraintsFeature::LoadSourceLabelSet()
Expand Down
13 changes: 5 additions & 8 deletions moses/FF/SoftSourceSyntacticConstraintsFeature.h
Expand Up @@ -59,11 +59,11 @@ class SoftSourceSyntacticConstraintsFeature : public StatelessFeatureFunction
std::string m_unknownLeftHandSideFile;
size_t m_featureVariant;

mutable boost::unordered_map<std::string,size_t> m_sourceLabels;
mutable std::vector<std::string> m_sourceLabelsByIndex;
mutable boost::unordered_set<size_t> m_coreSourceLabels;
mutable boost::unordered_map<const Factor*,size_t> m_sourceLabelIndexesByFactor;
mutable size_t m_GlueTopLabel;
boost::unordered_map<std::string,size_t> m_sourceLabels;
std::vector<std::string> m_sourceLabelsByIndex;
boost::unordered_set<size_t> m_coreSourceLabels;
boost::unordered_map<const Factor*,size_t> m_sourceLabelIndexesByFactor;
size_t m_GlueTopLabel;
// mutable size_t m_XRHSLabel;
// mutable size_t m_XLHSLabel;

Expand All @@ -72,9 +72,6 @@ class SoftSourceSyntacticConstraintsFeature : public StatelessFeatureFunction
float m_smoothingWeight;
float m_unseenLHSSmoothingFactorForUnknowns;

mutable std::vector< std::string > m_sparseFeatureKeyCache;
mutable std::vector< bool > m_sparseFeatureKeyCacheIsValid;

void Load();
void LoadSourceLabelSet();
void LoadCoreSourceLabelSet();
Expand Down

0 comments on commit 856e20b

Please sign in to comment.