Code Monkey home page Code Monkey logo

Comments (5)

robertfeldt avatar robertfeldt commented on July 18, 2024

The simplest entrypoint might be to check how the qgram.jl file changed in this:

https://github.com/robertfeldt/StringDistances.jl/blob/simpler_counter_design/src/distances/qgram.jl

from stringdistances.jl.

matthieugomez avatar matthieugomez commented on July 18, 2024

That looks good. Maybe it'd be even better to remove the _count function, and define a countmatches!(mc::AbstractWordMatchCounter, d1::QGramIterator, d2::QGramIterator) method instead.

from stringdistances.jl.

robertfeldt avatar robertfeldt commented on July 18, 2024

Thanks for taking a look. Hmm, yes, but there would be no performance benefit, right, since we still need to create the full dict currently done in _count. Might clean up the code somewhat but not by much. I guess we might save some memory by not having to send the result from values(d) back but can just iterate over it. Or am I missing something?

BTW, thanks for making me a contributor. Should I still do PRs from my forked repo or is there a simplification in the workflow? (I couldn't see what rights came with the new role).

from stringdistances.jl.

matthieugomez avatar matthieugomez commented on July 18, 2024

For the workflow, I think the idea is that you should still do PR (as I should, I need to stop committing directly), but then you can merge them by yourself (when you think it is ready, say, after a few days).

For my proposition, yes it’s just about cleaning the code a bit, not about changing performances

from stringdistances.jl.

matthieugomez avatar matthieugomez commented on July 18, 2024

Could you make a PR with your code? Maybe it's better to un-export QGramDict and QgramSortedVector (or the new names you use). Not sure why I did that in the first place.

from stringdistances.jl.

Related Issues (20)

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.