Skip to content

Commit

Permalink
Merge pull request odashi#5 from catalincraciun/master
Browse files Browse the repository at this point in the history
Minor change in style
  • Loading branch information
odashi authored Aug 8, 2017
2 parents f16de9a + 3d20aa7 commit 2a877b1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mteval/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ double Utility::calculateLevenshteinDistance(
int len_hyp = hyp.size();

// initialize DP table as a matrix with len_ref + 1 rows and len_hyp + 1 columns
vector< vector<double> > dp;
dp.resize(len_ref + 1);
for (int i = 0; i <= len_ref; i++) {
dp[i].resize(len_hyp + 1);
}
vector< vector<double> > dp(len_ref + 1, vector<double>(len_hyp + 1));

for (int i = 0; i <= len_ref; ++i) {
dp[i][0] = del_weight * static_cast<double>(i);
Expand Down

0 comments on commit 2a877b1

Please sign in to comment.