You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a small guard clause to main run method on TextRank class to ensure short text queries do not result in infinite looping. Should resolvelouismullie#4, but a more thorough solution is likely a guard clause in the underlying PageRank module. Opted for this solution as it changes the least amount of the original author’s code while supporting the additional spec.
When using a short sentence it seems there is no checking to see if there are at least 1 path in the graph (2 nodes) causing an infinite loop.
Should return an error, or the single keyword that was found via cleaning.
One possible solution could be to
inside the run method of text_rank.rb.
The text was updated successfully, but these errors were encountered: