cloud-barista / cm-beetle

Apache License 2.0
4 stars 6 forks source link

Enhance the function to find an ideal VM OS image #98

Closed yunkon-kim closed 3 months ago

yunkon-kim commented 3 months ago

This PR will help recommend a more ideal VM OS image. : When a user inputs "Ubuntu 22.04.4 LTS (Jammy Jellyfish) x86_64 SSD" and requests a recommendation for a VM OS image, : among many images, "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20191002" can be recommended as an ideal image.

The details

It has been discovered that in some cases, LevenshteinDistance is not properly recommending VM OS images.

For example, when comparing '22.04' with '22.04.4', '20.04', and '18.04', '22.04.4' should be the most similar one. But, the results were as follows.

SequenceMatcher can resolve this issue as follows.

Lastly, to exclude unnecessary similarity ratio values ​​of short substrings, LeRU with a threshold of 0.5 was applied.

(Extra examples)

yunkon-kim commented 3 months ago

/approve