Git Product home page Git Product logo

Comments (3)

belambert avatar belambert commented on September 26, 2024

I'm not sure I understand your question. Could you elaborate?

from edit-distance.

Lazik avatar Lazik commented on September 26, 2024

Currently the algorithm works with list of list
['a','b',['c','d','e']] but it will treat the third list as one element that it can remove or substitute.

Would it be possible to consider elements and if it is a list, to be able to move it and add element to the inner list itself?

An example:
a : ['a','b',['c','d','e']]
b : ['a',['c','d'], 'b']

Instead of deleting the third element and adding ['c','d'] in the second position
You would move the third element to the second position and remove the inner element 'e'.
(I realize this would be a tie but sometimes it would be better to do the second approach)

Hopefully that makes sense, let me know what you think

from edit-distance.

belambert avatar belambert commented on September 26, 2024

I'm still not sure I completely understand. But it sounds like you're trying to compute the edit distance recursively? So the inner distance between [c d] and [c d e] is 1, and thus that's the substitution cost in the outer list. It seems like you could probably do that, by doing a recursion instead of just doing a regular identity comparison.

But, why do you want to? What's the problem you're trying to solve? Perhaps there's a better approach.

from edit-distance.

Related Issues (5)

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.