Closed rudenkoRD closed 3 months ago
Code to reproduce:
import 'package:fuzzywuzzy/fuzzywuzzy.dart'; void main() { print(weightedRatio('\n \n ', 'test')); }
Result:
Unsupported operation: Infinity or NaN toInt #0 double.toInt (dart:core-patch/double.dart) #1 double.round (dart:core-patch/double.dart:194:34) #2 SimpleRatio.apply (package:fuzzywuzzy/ratios/simple_ratio.dart:7:47) #3 TokenSet.apply (package:fuzzywuzzy/algorithms/token_set.dart:24:23) #4 tokenSetRatio (package:fuzzywuzzy/fuzzywuzzy.dart:41:21) #5 WeightedRatio.apply (package:fuzzywuzzy/algorithms/weighted_ratio.dart:42:22) #6 weightedRatio (package:fuzzywuzzy/fuzzywuzzy.dart:60:26) #7 calc (package:benchmarks/test_fuzzywuzzy.dart:4:9) #8 main (file:///Users/ruslanr/SolidProjects/benchmarks/bin/benchmarks.dart:7:19) #9 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33) #10 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
@rudenkoRD Thanks for the bug report! Version 1.1.7 has been published with the fix.
Code to reproduce:
Result: