GithubHelp home page GithubHelp logo

Matcher algorithms about gumtree HOT 4 CLOSED

gumtreediff avatar gumtreediff commented on June 4, 2024
Matcher algorithms

from gumtree.

Comments (4)

jrfaller avatar jrfaller commented on June 4, 2024

Hi!

Thanks for reporting an issue about GumTree.

This is really strange, Matchers.getInstance().getMatcher(src, dst) should return an instance of ClassicGumtree, and not ZsMatcher. Can you provide me the code to reproduce the problem, against the latest commit on the develop branch?

ClassicMatcher is the only (almost 😉) production ready matcher furnished in GumTree, all the others are only implemented for evaluation purpose. However if there is a infinite loop in ZsMatcher,
I am really interested about the test case since this matcher is used under the hood by ClassicGumtree.

Cheers!

from gumtree.

onhate avatar onhate commented on June 4, 2024

Thanks for you response @jrfaller

It is possible that Matchers.getInstance().getMatcher(src, dst) is returning ClassicGumtree but calling ZsMatcher, I thought it was returning just ZsMatcher because that's what I see on stacktrace when it goes infinite loop.

using these files (I know they are very peculiar).
https://gist.github.com/onhate/21bd5764fcf333051d05e221e7063a5e

and this snippet

TreeContext src = Generators.getInstance().getTree(left.toString());
TreeContext dst = Generators.getInstance().getTree(right.toString());

Matcher matcher = Matchers.getInstance().getMatcher(src.getRoot(), dst.getRoot());
matcher.match();

TreeClassifier classifier = new RootAndLeavesClassifier(src, dst, matcher);

from gumtree.

jrfaller avatar jrfaller commented on June 4, 2024

OK thanks for the files!

The problem seems to come from the variable LZD containing a binary string because when I remove it, it works like a charm.

I am not sure though why it's a problem for ZsMatcher, unless it comes from the levenstein distance that is computed under the hood.

from gumtree.

jrfaller avatar jrfaller commented on June 4, 2024

Actually, the method used to return label similarity is this one :

return 1D - StringMetrics.qGramsDistance().compare(n1.getLabel(), n2.getLabel());

from gumtree.

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.