Нечеткое совпадение строки с частичным_ соотношением - PullRequest
0 голосов
/ 06 августа 2020

У меня есть подстрока, которую нужно сравнить с основной строкой, я использовал алгоритм FuzzyMatch Partial Ratio, но почему-то оценка кажется несоответствующей

подстрока:

Aspire 1 14

Основная строка: Acer Aspire 1 14 Inch Celeron 4GB 64GB Cloudbook - Red This sleek HD Acer Aspire 1 delivers an inviting tactile finish, featuring 4GB of RAM and an Intel Celeron Processor complete daily tasks and surf the internet seamlessly. Whilst 64GB of storage gives you enough space to easily store and share your important media and documents. #||#The classy look of the Aspire 1 is matched only by the convenience of its thin, easily portable design. #||#The Precision Touch-pad is more responsive than traditional touch-pads helping you work more effectively. #||#Model number: A114-32. #||#General features:#||#Size H1.79, W34.3, D24.5cm. #||#Weight 1.65kg. #||#Up to 10 hours battery life. #||#CPU, Memory and Operating System:#||#Intel Celeron N4000 processor. #||#Dual core processor. #||#1.1GHz processor speed with a burst speed of 2.6GHz. #||#4GB RAM DDR4. #||#64GB eMMC storage. #||#Microsoft Windows 10 S. #||#Display features:#||#14 inch screen. #||#High definition display. #||#Resolution 1366 x 768 pixels. #||#DVD optical drives:#||#Disc drive not included. #||#Graphics:#||#Intel UHD Graphics 600 graphics card. #||#Shared graphics card. #||#Interfaces and connectivity:#||#SD media card reader. #||#Secure Digital (SD), . #||#2 USB 2.0 ports. #||#1 USB 3.0 port. #||#1 Ethernet port. #||#1 HDMI port. #||#Bluetooth. #||#Wi-Fi enabled. #||#Multimedia features:#||#HD webcam. #||#Built-in mic. #||#Built-in audio sound system. #||#30 days Norton Security. #||#General information:#||#Manufacturer's 1 year guarantee. #||#EAN: 4710180446104. Size H1.79, W34.3, D24.5cm.#||#Weight 1.65kg.#||#Up to 10 hours battery life.#||#Intel Celeron N4000 processor.#||#Dual core processor.#||#1.1GHz processor speed with a burst speed of 2.6GHz.#||#4GB RAM DDR4.#||#64GB eMMC storage.#||#Microsoft Windows 10 S.#||#14 inch screen.#||#High definition display.#||#Resolution 1366 x 768 pixels.#||#Disc drive not included.#||#Intel UHD Graphics 600 graphics card.#||#Shared graphics card.#||#SD media card reader.#||#Secure Digital (SD), .#||#2 USB 2.0 ports.#||#1 USB 3.0 port.#||#1 Ethernet port.#||#1 HDMI port.#||#Bluetooth.#||#Wi-Fi enabled.#||#HD webcam.#||#Built-in mic.#||#Built-in audio sound system.#||#30 days Norton Security.#||#Manufacturer's 1 year guarantee.#||#EAN: 4710180446104.

Ожидаемый результат - 100, но получил только 55

Любые предложения приветствуются! Заранее спасибо!

Заголовок

1 Ответ

0 голосов
/ 17 августа 2020

Выяснилось, что если длина любой из строк (количество символов) пересекает пороговое значение, partial_ratio устанавливает для Sequence Matcher значение false, а оценки не равны 100%, даже если есть частичное совпадение строки

...