miso-belica / sumy

Module for automatic summarization of text documents and HTML pages.
https://miso-belica.github.io/sumy/
Apache License 2.0
3.46k stars 525 forks source link

Fixed bug with LexRank's power iteration #194

Closed AryazE closed 11 months ago

AryazE commented 1 year ago

The power_method in summarizers/lex_rank.py was not correct. The lambda_val was increasing for this test and hence resulted in inf and nan values reported in #187 (also a warning would be raised when running that test). The problem was that the next_p vector should have been normalized after the matrix multiplication according to the Wikipedia entry, which it was not.

AryazE commented 11 months ago

Done! :heavy_check_mark: