Gabriel commited on
Commit
7944963
1 Parent(s): 3a0121e

Update text.py

Browse files
Files changed (1) hide show
  1. text.py +6 -6
text.py CHANGED
@@ -6,8 +6,8 @@ The goal of text summarization is to condense long documents into summaries, whi
6
  Text summarization methods can either be used as an extractive or abstractive model. An Extractive method does what it sounds like, it concatenates different important sentences or paragraphs without understanding the meaning of those parts. Extractive summarization does not create any new word phrases. For instance, if you presented a page of text to an extractive model, it would just act as a text “highlighter”. However, Abstractive summarization generates text in a fashion that tries to guess the meaning in a summarised way of the page of text it is presented. It would put words together in a meaningful way and add the most important fact found in the text.
7
 
8
  <figure>
9
- <img src="file/EX_VS_ABS.png" alt="Trulli" style="width:100%">
10
- <figcaption style="text-align: center;">Fig.1 - Trulli, Puglia, Italy.</figcaption>
11
  </figure>
12
 
13
  <h3><center> Abstractive Model </center></h3>
@@ -26,8 +26,8 @@ sum_app_text_tab_2= """
26
  The figure below illustrates how the skill level of the model increases at each step:
27
 
28
  <figure>
29
- <img src="file/BART_SEQ.png" alt="Trulli" style="width:100%">
30
- <figcaption style="text-align: center;">Fig.1 - Trulli, Puglia, Italy.</figcaption>
31
  </figure>
32
 
33
  The main benefits of transfer learning in general include the saving of resources and improved efficiency when training new models, so feel free to adopt this model for your type of problem!
@@ -37,8 +37,8 @@ The main benefits of transfer learning in general include the saving of resource
37
  The extractive models for this app are using sentence-transformer models, which basically is a bi-encoder that determines how similar two sentences are. This type of models convert texts into vectors (embedding) that capture semantic information. Additionally, LexRank, an unsupervised graph-based algorithm, is used to determine centrality scores as a post-process step to summarise. The main idea is that sentences "recommend" other similar sentences to the reader. Thus, if one sentence is very similar to many others, it will likely be a sentence of great importance. The importance of this sentence also stems from the importance of the sentences "recommending" it. Thus, to get ranked highly and placed in a summary, a sentence must be similar to many sentences that are in turn also similar to many other sentences.
38
 
39
  <figure>
40
- <img src="file/Lex_rank.png)" alt="Trulli" style="width:100%">
41
- <figcaption style="text-align: center;">Fig.1 - Trulli, Puglia, Italy.</figcaption>
42
  </figure>
43
 
44
  The figure above showcase how LexRank formats similarity graphs based on all possible sentence combinations sentence similarity from the vector embeddings. Notice that the most "recommended" sentences that are extracted (the right graph) are derived from a threshold value which filters "weaker" connections in the similarity graph.
 
6
  Text summarization methods can either be used as an extractive or abstractive model. An Extractive method does what it sounds like, it concatenates different important sentences or paragraphs without understanding the meaning of those parts. Extractive summarization does not create any new word phrases. For instance, if you presented a page of text to an extractive model, it would just act as a text “highlighter”. However, Abstractive summarization generates text in a fashion that tries to guess the meaning in a summarised way of the page of text it is presented. It would put words together in a meaningful way and add the most important fact found in the text.
7
 
8
  <figure>
9
+ <img src="file/EX_VS_ABS.png" alt="EX_VS_ABS" style="width:100%">
10
+ <figcaption style="text-align: center;">Fig.1 - The two different approaches to text summarization: Extractive and Abstractive.</figcaption>
11
  </figure>
12
 
13
  <h3><center> Abstractive Model </center></h3>
 
26
  The figure below illustrates how the skill level of the model increases at each step:
27
 
28
  <figure>
29
+ <img src="file/BART_SEQ.png" alt="BART_SEQ" style="width:100%">
30
+ <figcaption style="text-align: center;">Fig.1 - A model progression between on 3 aspects during sequential adoption: domain language, task and language..</figcaption>
31
  </figure>
32
 
33
  The main benefits of transfer learning in general include the saving of resources and improved efficiency when training new models, so feel free to adopt this model for your type of problem!
 
37
  The extractive models for this app are using sentence-transformer models, which basically is a bi-encoder that determines how similar two sentences are. This type of models convert texts into vectors (embedding) that capture semantic information. Additionally, LexRank, an unsupervised graph-based algorithm, is used to determine centrality scores as a post-process step to summarise. The main idea is that sentences "recommend" other similar sentences to the reader. Thus, if one sentence is very similar to many others, it will likely be a sentence of great importance. The importance of this sentence also stems from the importance of the sentences "recommending" it. Thus, to get ranked highly and placed in a summary, a sentence must be similar to many sentences that are in turn also similar to many other sentences.
38
 
39
  <figure>
40
+ <img src="file/Lex_rank.png" alt="Lex_rank" style="width:100%">
41
+ <figcaption style="text-align: center;">Fig.3 - The right similarity graphs connection have been filtered with a corresponding threshold.</figcaption>
42
  </figure>
43
 
44
  The figure above showcase how LexRank formats similarity graphs based on all possible sentence combinations sentence similarity from the vector embeddings. Notice that the most "recommended" sentences that are extracted (the right graph) are derived from a threshold value which filters "weaker" connections in the similarity graph.