Giter Site home page Giter Site logo

ferret's People

Contributors

argusdusty avatar bryant1410 avatar codelingobot avatar emilsjolander avatar slymarbo avatar smussmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ferret's Issues

How to search unicode text?

How there.
Thank you for awesome package. Is Ferret can be used to index and search unicode text? I mean without UnicodeToASCII conversation?

Query ResultsLimit unlimited doc is incorrect

//     ResultsLimit: Limit the results to some number of values. Set to -1 for no limit
func (IS *InvertedSuffix) Query(Word string, ResultsLimit int) ([]string, []interface{}) {
    Query := IS.Converter(Word)
    Results := make([]string, 0, ResultsLimit)
    Values := make([]interface{}, 0, ResultsLimit)

So setting ResultsLimit to -1 as documented results in make([]string, 0, -1) which results in panic: runtime error: makeslice: cap out of range at runtime.

Various

Please, add info on average & worst complexity in godoc comments for each function.

Also, in godoc comments for "Insert" function, you refer to "MakeInvertedSuffix", which is not present - supposedly that was an old name and you mean the "New" function?

Also, you have lots of deeply nested ifs in your code - you could consider using 'continue' in ifs in loops, to ease reading.

Also, you have quite a few exact repetitions of big chunks of code, I strongly advise to seriously consider extracting them to functions, or please at least comment if that's as is because of Serious Optimizations Totally Backed By Measurements And Not Premature, otherwise (paired with the issue above) they make reading the codebase highly tedious and irritating.

thanks.

examples

Example code didn't build for me until I capitalized the 'f' in 'Ferret' in the import statements. I changed:
"github.com/argusdusty/ferret"
to:
"github.com/argusdusty/Ferret"

dictionaryexample expects DOS line endings

dictionaryexample.go splits the dictionary.dat file by "\r\n" but the dictionary.dat file has only "\n" line endings. Consequently, it fails to build the word table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.