question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Path similarity is extremly slow

See original GitHub issue

Hi there! I have a problem with wn. The calculation of the path similarity takes extremly long.

Minimal example:

import wn
from wn import similarity

wn_instance = wn.Wordnet(lang='de')

sets_1 = wn_instance.synsets('Anarchie')
sets_2 = wn_instance.synsets('Fotografie')
print(sets_1)
print(sets_2)
w1 = sets_1[0]
w2 = sets_2[0]
print(similarity.path(w1, w2))  # this is extreme slow

What is the problem here? Does the graph searching just takes too long? And is there way to set a timeout value or something like that?

Best, Willi

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
goodmamicommented, Jan 28, 2021

Sorry, I mean v0.5.0 of this library, Wn.

> python -m pip install -U wn

The German data still has some problems, but hopefully Wn won’t get stuck as easily as before.

1reaction
LostInDarkMathcommented, Jan 22, 2021

Thank you very much for the detailed answer! Now I understand better how it works 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scipy Cosine Similarity is very slow using Pandas Dataframes
Let's do some quick benchmarking of calculating cosine similarity so we have a baseline understanding of its performance
Read more >
Speed up Cosine Similarity computations in Python using ...
Being an interpreter language, it speeds up the development. However, the same makes it slower during run time as it has to compile...
Read more >
Similarity Measures — NetworkX 2.8.8 documentation
Functions measuring similarity using graph edit distance. ... The problem of finding the exact Graph Edit Distance (GED) is NP-hard so it is...
Read more >
SimRank: Similarity Analysis Explanation and Python ...
SimRank is an intuitive and general approach in the similarity ... So the calculation will be extremely slow if there are too many...
Read more >
Efficient Graph Similarity Computation via Knowledge Distillation
Slow Learning and Fast Inference: Efficient Graph Similarity Computation via ... So, I think the experimental results cannot well support the claim that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found