GithubHelp home page GithubHelp logo

databasegroup / apted Goto Github PK

View Code? Open in Web Editor NEW
113.0 113.0 33.0 205 KB

APTED algorithm for the Tree Edit Distance

Home Page: http://tree-edit-distance.dbresearch.uni-salzburg.at/

License: MIT License

Java 100.00%

apted's People

Contributors

augsten 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

apted's Issues

feedback: what do you think of the TreeDiff file format?

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:

  • ease building tools on top of tree differencing
  • ease scientific experiments to compare the effectiveness of each tool on specific use cases.

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

Can we include node value in the input?

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!

Support escaping curly braces in the input

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);

NodeIndexer's postL_to_node is not returning the proper node.

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

problemWithNodeIndexer.txt

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.