Comments (3)
I'm not sure I understand your question. Could you elaborate?
from edit-distance.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edit-distance.