Task #1543
Refactor the save_candidates function from BR3_IR3_tagger.py
100%
Description
In this task, we need to refactor a small portion of code from the "save_candidates" function from BR3_IR3_tagger.py.
We need to create a function out of lines 722 to 729 as added in the screenshot and call that function in save_candidates in place of the entire block of code. The name of the new function can be candidate_variant_distance_calculation.
You can test this function using any small dataset like the Whirlwind book or Tutorial book.
Steps for testing
1. Generate "Python 3 - Tutorial_BR2IR2_NP.txt" before your changes and download it. This is the base comparison file.
2. Make changes, delete master_cands_0.pkl and re-generate "Python 3 - Tutorial_BR2IR2_NP.txt". Download this file as well.
3. Use any online tool like https://www.textcompare.org/ for comparing the contents of two files. If they are identical, your changes are perfect.
Files