Building the revised approach
Now we will be coding the algorithm that we discussed in the previous section. After implementing it, we will check how well or badly our algorithm is performing. This algorithm is easy to implement, so let's begin with the code. You can find the code at this GitHub link: https://github.com/jalajthanaki/medical_notes_extractive_summarization/tree/master/Revised_approach.
Implementing the revised approach
In this section, we will be implementing the summarization algorithm step by step. These are the functions that we will be building here:
- The get_summarized function
- The reorder_sentences function
- The summarize function
Let's begin with the first one.
The get_summarized function
Basically, this function performs the summarization ...