Skip to content

egusahiroaki/aimysearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AiMySearch PyPI version Build Status Coverage Status

AiMySearch is a tool for fuzzy search. This is useful for detecting typos.

The good point is that you don't have to split your texts.

In case of Japanese sentences, this tool is most effective.

Installation

install it yourself as:

pip install aimysearch

Usage

target = "コンピューター"
text = "昨日コンピューターを買ったので、古いコンピュータは友人にあげた。"
s = search.AiMySearch(target, text)
s.run()

# [{'text': '古いコンピュータは友', 'index': 16, 'length': 7}]

A third argument is used for choosing the length N-character string fragments. The minimum length of fragments is the same as target word.

A forth argument is match rate in texts.

target = "hogehoge"
text = "hogehogfugafugapiyopihogehugepiyo"
s = search.AiMySearch(target, text, 0, 0.8)
s.run()

# [{'index': 0, 'length': 8, 'text': 'hogehogf'}, {'index': 21, 'length': 8, 'text': 'hogehuge'}]

License

MIT

About

tool for fuzzy search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages