{"id":19267057,"url":"https://github.com/mljs/tanimoto","last_synced_at":"2025-04-21T19:32:38.696Z","repository":{"id":35371066,"uuid":"39634119","full_name":"mljs/tanimoto","owner":"mljs","description":"Tanimoto similarity and distance","archived":false,"fork":false,"pushed_at":"2018-02-22T13:33:32.000Z","size":58,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-09-29T05:43:10.023Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mljs.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-24T13:09:49.000Z","updated_at":"2021-05-29T04:25:35.000Z","dependencies_parsed_at":"2022-09-03T14:51:00.779Z","dependency_job_id":null,"html_url":"https://github.com/mljs/tanimoto","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Ftanimoto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Ftanimoto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Ftanimoto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mljs%2Ftanimoto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mljs","download_url":"https://codeload.github.com/mljs/tanimoto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223876401,"owners_count":17218388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T20:09:51.404Z","updated_at":"2025-04-21T19:32:38.690Z","avatar_url":"https://github.com/mljs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tanimoto\n\n  [![NPM version][npm-image]][npm-url]\n  [![build status][travis-image]][travis-url]\n  [![Test coverage][codecov-image]][codecov-url]\n  [![npm download][download-image]][download-url]\n\nTanimoto similarity and distance methods.\n\n## Installation\n\n`$ npm install --save ml-tanimoto`\n\n## Usage\n### Binary\n```js\nimport { binarySimilarity, binaryDistance } from 'ml-tanimoto';\n\nconst str1 = '1100000011111110010111010110011010100111110100100100110110111110';\nconst str2 = '0111000100100001100101001001111000000111001001001001010001011101';\n\nbinarySimilarity(str1, str2) === 0.2549;\nbinaryDistance(str1, str2) === 0.7451;\n```\n\n### General values\n```js\nimport { valueSimilarity, valueDistance } from 'ml-tanimoto';\n\nconst values1 = [true, true, true];\nconst values2 = [true, false, false];\n\nvalueSimilarity(values1, values2) === 0.5;\nvalueDistance(values1, values2) === 0.5;\n```\n\n### Bit-array values\n```js\nimport { bitArraySimilarity, bitArrayDistance } from 'ml-tanimoto';\n\nconst values1 = [1, 1, 1];\nconst values2 = [1, 0, 0];\n\nbitArraySimilarity(values1, values2) === 0.333;\nbitArrayDistance(values1, values2) === 0.666;\n```\n\n## [API Documentation](https://mljs.github.io/tanimoto/)\n\n## License\n\n  [MIT](./LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/ml-tanimoto.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/ml-tanimoto\n[travis-image]: https://img.shields.io/travis/mljs/tanimoto/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/mljs/tanimoto\n[codecov-image]: https://img.shields.io/codecov/c/github/mljs/tanimoto.svg?style=flat-square\n[codecov-url]: https://codecov.io/gh/mljs/tanimoto\n[download-image]: https://img.shields.io/npm/dm/ml-tanimoto.svg?style=flat-square\n[download-url]: https://www.npmjs.com/package/ml-tanimoto\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmljs%2Ftanimoto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmljs%2Ftanimoto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmljs%2Ftanimoto/lists"}