sumy — чудесная библиотека для генерации summary (краткого содержания) для текста, причем поддерживает разные языки. Внутри 8 алгоритмов, которые просто работают, без обучения жирных нейросетей на кластерах и танцев с бубнами. Качество текста на выходе варьируется для разных текстов и алгоритмов, но в целом получается очень круто.
Давно хотели прочитать Lord of the Rings в оригинале, но всё не доходили руки? Ничего страшного, вот вам пересказ, сгенерированный по алгоритму Эдмундсона:
And in that moment all the trumpets were blown, and the King Elessar went forth and came to the barrier, and Horin of the Keys thrust it back; and amid the music of harp and of viol and of flute and the singing of clear voices the King passed through the flower -laden streets, and came to the Citadel, and entered in; and the banner of the Tree and the Stars was unfurled upon the topmost tower, and the reign of King Elessar began, of which many songs have told.
In his time the City was made more fair than it had ever been, even in the days of its first glory; and it was filled with trees and with fountains, and its gates were wrought of mithril and steel, and its streets were paved with white marble; and the Folk of the Mountain laboured in it, and the Folk of the Wood rejoiced to come there; and all was healed and made good, and the houses were filled with men and women and the laughter of children, and no window was blind nor any courtyard empty; and after the ending of the Third Age of the world into the new age it preserved the memory and the glory of the years that were gone.
The slow voices of the Riders stirred the hearts even of those who did not know the speech of that people; but the words of the song brought a light to the eyes of the folk of the Mark as they heard again afar the thunder of the hooves of the North and the voice of Eorl crying above the battle upon the Field of Celebrant; and the tale of the kings rolled on, and the horn of Helm was loud in the Then a minstrel and loremaster stood up and named all the names of the Lords of the Mark in their order: Eorl the Young; and Brego builder of the Hall; and Aldor brother of Baldor the hapless; and Frja, and Frjawine, and Goldwine, and Djor, and Gram (о, да это же я); and Helm who lay hid in Helm’s Deep when the Mark was overrun; and so ended the nine mounds of the west-side, for in that time the line was broken, and after came the mounds of the east-side: Frjalaf, Helm s sister -son, and Ljofa, and Walda, and Folca, and Folcwine, and Fengel, and Thengel, and Thjoden the latest.