Modified Unit-tests so that they always report scores using '.' as decimal separator#2
Modified Unit-tests so that they always report scores using '.' as decimal separator#2Erechtheus wants to merge 8 commits intoREAD-BioMed:masterfrom
Conversation
…cimal separator (i.e., 1.000)
|
Thanks for your contributions. I never knew German uses "," to denote decimal places, great to know that. I will try to have a look at the changes. |
|
Yes, the "," decimal point thing is a real nuisance. :-( |
|
Hi! I just realized that I messed up my pull request. I think the first changes are already sufficient to avoid the Unit-test errors: |
aalbahem
left a comment
There was a problem hiding this comment.
@Erechtheus Thanks again for your contribution.
Though I acknowledge the problem you are trying to fix and it shows the limitation of of brateval core. It is too rigid and does not allow customisation.
I think the solution is not to replace it with Output.csv, the solution is to refactor the code so we can pass the formatter and load it at run time while having a default one. This way, if someone else wants another formatter, they do not need to change inside the code, but use brateval as a dependency and use their formatter in runtime. I am working on this right now, it would create a better way for everyone to use and contribute more formatter.
| { f_measure = (2*precision*recall)/(double)(precision+recall); } | ||
|
|
||
| System.out.println(rt | ||
| + "|tp:" + TP |
There was a problem hiding this comment.
That will create incompatibility with any code that uses or expects this format. We use brateval internally in a project and I can assure this will break out code.
Nevertheless, I know what is the problem. The problem is that our code does not allow an easy way to override output format. I am going to create a new issue to track this.
| } | ||
|
|
||
|
|
||
| public OutFmt outFmt = OutFmt.PLAIN; |
There was a problem hiding this comment.
This is another breaking changes from what we have.
|
This can be done better when #3 is done. |
Unit-tests do not work with German Locale (DE), because scores are here reported as 1,000 instead of 1.000. However, the tests expect English-locale to work, which uses decimal separator. I therefore slightly modified the tests so that the locale is set to EN/US.