C# Class NBoilerpipe.Filters.English.KeepLargestFulltextBlockFilter

Keeps the largest NBoilerpipe.Document.TextBlock only (by the number of words). In case of more than one block with the same number of words, the first block is chosen. All discarded blocks are marked "not content" and flagged as NBoilerpipe.Labels.DefaultLabels.MIGHT_BE_CONTENT . As opposed to NBoilerpipe.Filters.Heuristics.KeepLargestBlockFilter , the number of words are computed using HeuristicFilterBase.GetNumFullTextWords(NBoilerpipe.Document.TextBlock) , which only counts words that occur in text elements with at least 9 words and are thus believed to be full text. NOTE: Without language-specific fine-tuning (i.e., running the default instance), this filter may lead to suboptimal results. You better use NBoilerpipe.Filters.Heuristics.KeepLargestBlockFilter instead, which works at the level of number-of-words instead of text densities.
Inheritance: NBoilerpipe.Filters.English.HeuristicFilterBase, BoilerpipeFilter
Mostrar archivo Open project: oganix/NBoilerpipe

Public Properties

Property Type Description
INSTANCE KeepLargestFulltextBlockFilter

Public Methods

Method Description
Process ( NBoilerpipe.Document.TextDocument doc ) : bool

Method Details

Process() public method

public Process ( NBoilerpipe.Document.TextDocument doc ) : bool
doc NBoilerpipe.Document.TextDocument
return bool

Property Details

INSTANCE public_oe static_oe property

public static KeepLargestFulltextBlockFilter,NBoilerpipe.Filters.English INSTANCE
return KeepLargestFulltextBlockFilter