Skip to main content

An algorithm provides scores between 0.0 (no match) to 1.0 (perfect match) for a comparison of two strings.

Project description

PyPI version Build Status Coverage Status Downloads

An algorithm provides scores between 0.0 (no match) to 1.0 (perfect match) for a comparison of two strings.

The algorithm is designed for auto-completion. For string similarity, please check Levenshtein distance (Wagner–Fischer algorithm).

Usage

Include the library:

from stringscore import liquidmetal

Score any string against an abbreviation:

>>> liquidmetal.score('FooBar', 'foo')
0.95
>>> liquidmetal.score('FooBar', 'fb')
0.916666666667
>>> liquidmetal.score('Foo Bar', 'fb')
0.928571428571
>>> liquidmetal.score('Foo Bar', 'baz')
0.0
>>> liquidmetal.score('Foo Bar', '')
0.8

Similar Works

License

String Score is released under the MIT License.

Credits

Copyright © 2003 Blacktree, Inc (Original author of Quicksilver)
Copyright © 2009 Ryan McGeary (Author of LiquidMetal)
Copyright © 2013 Grey Lee
Bitdeli badge

History

0.1.0 (2013-02-25)

  • First release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stringscore-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

File details

Details for the file stringscore-0.1.0.tar.gz.

File metadata

  • Download URL: stringscore-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stringscore-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa05026df6e8d871d0ea40c55e04641c1508853d8c07deb907a160527d8a2132
MD5 b01a4af7d15723d236a5db1b1b979ea3
BLAKE2b-256 1a02978764e3a58a6ab74297dffa4e85559c7cd548dea06e8ac0118f8fd0b974

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page