databasegroup / apted Goto Github PK
View Code? Open in Web Editor NEWAPTED algorithm for the Tree Edit Distance
Home Page: http://tree-edit-distance.dbresearch.uni-salzburg.at/
License: MIT License
APTED algorithm for the Tree Edit Distance
Home Page: http://tree-edit-distance.dbresearch.uni-salzburg.at/
License: MIT License
I am trying to use Apted, but I think the NodeIndexer is not returning the proper node.
I have two trees were the only difference is that one node was deleted from the source tree.
String sourceTree = "{A{B{X}{Y}{F}}{C}}";
String destinationTree = "{A{B{X}{Y}}{C}}";
I compute the edit distance and create the edit mapping.
float ed = apted.computeEditDistance(source, dest);
LinkedList<int[]> em = apted.computeEditMapping();
I get a proper mapping saying that node 3 (3 as in the index of that node when indexed in post order) was deleted, so far so good.
The problem comes when I want to find which node is node 3 (which should be "{F}").
The way I am trying to do this is by creating a NodeIndexer and using method postL_to_node to look for node 3.
NodeIndexer<Node, CostModel> niSource = new NodeIndexer(source, myCM);
Node node = niSource.postL_to_node(3);
and I get that node 3 is "{B{X}{Y}{F}}"
which is not "{F}",the node deleted.
I would like to know if this is a bug in postL_to_node, or maybe there is an easier way to look for a particular node from the mapping (a function that I input 3 and gives me Node {F}).
Thanks in advance
Trees with node labels that contain '{' and '}' characters cannot be directly provided to this tool at the moment. It would nice to support a way to escape these characters.
One way would be to update LblTree.fromString method so that it updated the input by replacing, for instance "{" and "}' characters with "\opencurl" and "\closecurl". Also replace "\" characters, for instance, with "\slash". Then it can continue building the associated trees.
public static LblTree fromString(String s)
{
int treeID = FormatUtilities.getTreeID(s);
// Implement escaping here
s = s.substring(s.indexOf("{"), s.lastIndexOf("}") + 1);
Maybe an issue is not the best place for it, but I've ported APTED to Python and I thought it would be nice to let you know: https://github.com/JoaoFelipe/apted
Hi,
We're working a common file format for the output of tree differencing tools. The idea is that many tree differencing tools would have an option to output this format. This would:
Here is a first draft of the TreeDiff file format: https://docs.google.com/document/d/15ITrZ4c0qdb4rGLfaMt8K9VPG1CkNp5QSgfOY6jzpEk/edit?usp=sharing (comments can be left in the Gdoc))
What do you think?
Best regards,
Jean-Rémy (@jrfaller), Matias (@martinezmatias) and Martin (@monperrus) (authors of Gumtree
Hi,
I see that in the "Customizing" section of your documentation, you mention that we can """Compares attribute .value of trees""". Therefore, the question is how should we input the tree which contains value at each node?
Thanks for your attention in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.