TextGraphics.Applications package

Submodules

TextGraphics.Applications.summary module

class TextGraphics.Applications.summary.LexRank(directory)[source]

Constructs a summary of the input document by extracting most informative sentences.

Arguments:
directory - A corpus of text files to be summarized.
lexR(graph)[source]

Compute the LexRank of the sentences. LexRank of a sentence in the sentence graph is the PageRank of the node representing the sentence. It is a measure of the importance and influence of the sentence in the corpus.

Arguments:
graph - A networkx graph or digraph.
Returns:
A dictionary of all the nodes with their PageRank scores.
summary(compression=0.25)[source]

Builds the summary based on the LexRank scores of the sentences.

Arguments:
compression : A number in [0,1] which is equal to the fraction of total sentences to be included in the summary. Default value is 0.25
Returns:
Summary of the input document.

Module contents

Table Of Contents

Previous topic

TextGraphics.Analysis package

Next topic

TextGraphics.Stopwords package

This Page