Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Darts-clone python binding

License

NotificationsYou must be signed in to change notification settings

rixwew/darts-clone-python

Repository files navigation

Darts-clone binding for Python 3.x.
This repository provides Cython-based pip-installable package.

Installation

pip install dartsclone

Usage

darts-clone-python is almost compatible with darts-clone.

importdartsclonedarts=dartsclone.DoubleArray()# build indexdata= [b'apple',b'banana',b'orange']values= [1,3,2]darts.build(data,values=values)# exact match searchresult=darts.exact_match_search('apple'.encode('utf-8'))print(result)# [1, 5]# common prefix searchresult=darts.common_prefix_search('apples'.encode('utf-8'),pair_type=False)print(result)# [1]# save indexdarts.save('sample.dic')# load indexdarts.clear()darts.open('sample.dic')# dump array dataarray=darts.array()# load array datadarts.clear()darts.set_array(array)

About

Darts-clone python binding

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors5


[8]ページ先頭

©2009-2025 Movatter.jp