{"id":21252641,"url":"https://github.com/rixwew/darts-clone-python","last_synced_at":"2025-07-11T01:33:06.435Z","repository":{"id":33372108,"uuid":"157889620","full_name":"rixwew/darts-clone-python","owner":"rixwew","description":"Darts-clone python binding","archived":false,"fork":false,"pushed_at":"2022-04-23T10:16:12.000Z","size":46,"stargazers_count":20,"open_issues_count":3,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-06T18:00:11.411Z","etag":null,"topics":["dart","double-array-trie","python","trie"],"latest_commit_sha":null,"homepage":null,"language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rixwew.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-11-16T15:57:51.000Z","updated_at":"2023-08-28T16:55:12.000Z","dependencies_parsed_at":"2022-07-27T15:30:34.028Z","dependency_job_id":null,"html_url":"https://github.com/rixwew/darts-clone-python","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixwew%2Fdarts-clone-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixwew%2Fdarts-clone-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixwew%2Fdarts-clone-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixwew%2Fdarts-clone-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixwew","download_url":"https://codeload.github.com/rixwew/darts-clone-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225669664,"owners_count":17505386,"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":["dart","double-array-trie","python","trie"],"created_at":"2024-11-21T03:48:18.674Z","updated_at":"2024-11-21T03:48:19.158Z","avatar_url":"https://github.com/rixwew.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"# darts-clone-python\n\n[Darts-clone](https://github.com/s-yata/darts-clone) binding for Python 3.x.  \nThis repository provides Cython-based pip-installable package.\n\n## Installation\n\n    pip install dartsclone\n\n\n## Usage\n\ndarts-clone-python is almost compatible with darts-clone.\n\n```python\nimport dartsclone\n\ndarts = dartsclone.DoubleArray()\n\n# build index\ndata = [b'apple', b'banana', b'orange']\nvalues = [1, 3, 2]\ndarts.build(data, values=values)\n\n# exact match search\nresult = darts.exact_match_search('apple'.encode('utf-8'))\nprint(result) # [1, 5]\n\n# common prefix search\nresult = darts.common_prefix_search('apples'.encode('utf-8'), pair_type=False)\nprint(result) # [1]\n\n# save index\ndarts.save('sample.dic')\n\n# load index\ndarts.clear()\ndarts.open('sample.dic')\n\n# dump array data\narray = darts.array()\n\n# load array data\ndarts.clear()\ndarts.set_array(array)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixwew%2Fdarts-clone-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixwew%2Fdarts-clone-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixwew%2Fdarts-clone-python/lists"}