New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLEU score #2477
BLEU score #2477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few initial comments
} | ||
|
||
std::map<WordVector, size_t> translationNGramCounts = GetNGrams(*trIt); | ||
std::map<WordVector, size_t> overlap; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use boost::string_view
instead of std::string
here and many other place too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used
typedef typename TranslationCorpusType::value_type WordVector;
statement in line number 52. I think it's up to the user what to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is ok to give user a choice, but here overlap variable doesn't have any relation with the user, I mean it is not exposed to user
map<<vector<string>>, size_t> overlap
, it would be unnecessary copy of whole string when inserting the value in overlap map
That's my POV, may be you can wait for someone to give a better insight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think it will be better to add tests for both types :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be unnecessary copy of whole string when inserting the value in overlap map
Ok I will see this. Thanks for clarifying.
@lozhnikov If you get some time, can you look this PR. This is done from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the slow response, I didn't see this PR. I added a few comments.
@lozhnikov @zoq Can this be merged now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments.
I think it's almost done. Let me look at the code a couple of times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments.
8b18226
to
92f9adf
Compare
@lozhnikov Can we conclude this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pointed out a small issue. I think after the fix we can merge this.
Co-authored-by: Mikhail Lozhnikov <lozhnikovma@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second approval provided automatically after 24 hours. 👍
I merged the PR. Thanks for the contribution! |
I thought the App Veyor build failed due to time limit. In fact it doesn't like the conversion from |
Thanks, @lozhnikov for all the reviews and suggestions:) Glad that you found the issue really quick. |
No description provided.