Skip to content
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

fix issue #782 #783

Merged
merged 2 commits into from
Jan 6, 2019
Merged

fix issue #782 #783

merged 2 commits into from
Jan 6, 2019

Conversation

varisd
Copy link
Member

@varisd varisd commented Jan 2, 2019

Issue #782 showed that there were some problems with edge cases (empty sentences, etc.). This PR solves these issues
test_chrf.py is also included to automatically test desired behaviour

from neuralmonkey.evaluators.chrf import ChrFEvaluator


CORPUS_DECODED = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neni lepší to naimportovat z testu na BLEU?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jasne, to asi jo. Nebo respektive to mit uplne bokem; porovnavani s hypo vet s refe vetama delas u vice metrik

ngr_dicts = []
for m in range(1, n + 1):
ngr_dict = {} # type: Dict[str, int]
for i in range(m, len(tokens)):
# if m > len(tokens), return an empty dict
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Komentář vyfičet.

@jindrahelcl jindrahelcl merged commit 2c71059 into master Jan 6, 2019
@jindrahelcl jindrahelcl deleted the chrf_fix branch January 6, 2019 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants