Compute the WordPiece merge score of a candidate pair: the pair's frequency divided by the product of the frequencies of its two parts, count(a)⋅count(b)count(ab).
Implement solve(pair_count,left_count,right_count).
Returns. Return a float. The part frequencies must be positive.
Example 1
Input:
solve(2.0, 3.0, 1.0)
Output:
0.666667
Example 2
Input:
solve(5.0, 5.0, 5.0)
Output:
0.2
No results yet
Run your code to check it against the examples, or submit to run every test.