AkihikoWatanabe / textrank

A python implementation of TextRank, which is a popular single document summarization model.
MIT License
6 stars 1 forks source link

Using the Glove embedding #1

Open lankokelly opened 5 years ago

lankokelly commented 5 years ago

Hi, the work is really help me a lot! However, I'm wondering that if I want to use the Glove to embed, where could I modify the text_rank.py file?

Thanks!

AkihikoWatanabe commented 5 years ago

Hi, thank you for your question.

If you want to use Glove embeddings in TextRank model, you need to calculate sentence similarities using sentence embedding calculated from Glove word embeddings. For example, we can calculate these sentence embeddings from the average value of embedding of words in the sentence. Please overwrite calcsimilarity method in the text_rank.py to create the sentence similarity matrix by the sentence embeddings.

Thank you.