C# Class NBoilerpipe.Document.TextBlock

Describes a block of text.
Describes a block of text. A block can be an "atomic" text element (i.e., a sequence of text that is not interrupted by any HTML markup) or a compound of such atomic elements.
Inheritance: ICloneable
Afficher le fichier Open project: oganix/NBoilerpipe Class Usage Examples

Méthodes publiques

Свойство Type Description
EMPTY_END NBoilerpipe.Document.TextBlock
EMPTY_START NBoilerpipe.Document.TextBlock

Méthodes publiques

Méthode Description
AddLabel ( string label ) : void

Adds an arbitrary String label to this TextBlock .

AddLabels ( ) : void

Adds a set of labels to this TextBlock . null-references are silently ignored.

AddLabels ( ICollection l ) : void

Adds a set of labels to this TextBlock . null-references are silently ignored.

Clone ( ) : Object
GetContainedTextElements ( ) : BitSet

Returns the containedTextElements BitSet, or null.

Returns the containedTextElements BitSet, or null.

GetLabels ( ) : ICollection

Returns the labels associated to this TextBlock, or null if no such labels exist.

Returns the labels associated to this TextBlock, or null if no such labels exist. NOTE: The returned instance is the one used directly in TextBlock. You have full access to the data structure. However it is recommended to use the label-specific methods in TextBlock whenever possible.

GetLinkDensity ( ) : float
GetNumWords ( ) : int
GetNumWordsInAnchorText ( ) : int
GetOffsetBlocksEnd ( ) : int
GetOffsetBlocksStart ( ) : int
GetTagLevel ( ) : int
GetText ( ) : string
GetTextDensity ( ) : float
HasLabel ( string label ) : bool

Checks whether this TextBlock has the given label.

Checks whether this TextBlock has the given label.

IsContent ( ) : bool
MergeNext ( NBoilerpipe other ) : void
RemoveLabel ( string label ) : bool
SetIsContent ( bool isContent ) : bool
SetTagLevel ( int tagLevel ) : void
TextBlock ( string text ) : System
TextBlock ( string text, BitSet containedTextElements, int numWords, int numWordsInAnchorText, int numWordsInWrappedLines, int numWrappedLines, int offsetBlocks ) : System
ToString ( ) : string

Private Methods

Méthode Description
InitDensities ( ) : void

Method Details

AddLabel() public méthode

Adds an arbitrary String label to this TextBlock .
public AddLabel ( string label ) : void
label string The label
Résultat void

AddLabels() public méthode

Adds a set of labels to this TextBlock . null-references are silently ignored.
public AddLabels ( ) : void
Résultat void

AddLabels() public méthode

Adds a set of labels to this TextBlock . null-references are silently ignored.
public AddLabels ( ICollection l ) : void
l ICollection The labels to be added.
Résultat void

Clone() public méthode

public Clone ( ) : Object
Résultat Object

GetContainedTextElements() public méthode

Returns the containedTextElements BitSet, or null.
Returns the containedTextElements BitSet, or null.
public GetContainedTextElements ( ) : BitSet
Résultat Sharpen.BitSet

GetLabels() public méthode

Returns the labels associated to this TextBlock, or null if no such labels exist.
Returns the labels associated to this TextBlock, or null if no such labels exist. NOTE: The returned instance is the one used directly in TextBlock. You have full access to the data structure. However it is recommended to use the label-specific methods in TextBlock whenever possible.
public GetLabels ( ) : ICollection
Résultat ICollection

GetLinkDensity() public méthode

public GetLinkDensity ( ) : float
Résultat float

GetNumWords() public méthode

public GetNumWords ( ) : int
Résultat int

GetNumWordsInAnchorText() public méthode

public GetNumWordsInAnchorText ( ) : int
Résultat int

GetOffsetBlocksEnd() public méthode

public GetOffsetBlocksEnd ( ) : int
Résultat int

GetOffsetBlocksStart() public méthode

public GetOffsetBlocksStart ( ) : int
Résultat int

GetTagLevel() public méthode

public GetTagLevel ( ) : int
Résultat int

GetText() public méthode

public GetText ( ) : string
Résultat string

GetTextDensity() public méthode

public GetTextDensity ( ) : float
Résultat float

HasLabel() public méthode

Checks whether this TextBlock has the given label.
Checks whether this TextBlock has the given label.
public HasLabel ( string label ) : bool
label string The label
Résultat bool

IsContent() public méthode

public IsContent ( ) : bool
Résultat bool

MergeNext() public méthode

public MergeNext ( NBoilerpipe other ) : void
other NBoilerpipe
Résultat void

RemoveLabel() public méthode

public RemoveLabel ( string label ) : bool
label string
Résultat bool

SetIsContent() public méthode

public SetIsContent ( bool isContent ) : bool
isContent bool
Résultat bool

SetTagLevel() public méthode

public SetTagLevel ( int tagLevel ) : void
tagLevel int
Résultat void

TextBlock() public méthode

public TextBlock ( string text ) : System
text string
Résultat System

TextBlock() public méthode

public TextBlock ( string text, BitSet containedTextElements, int numWords, int numWordsInAnchorText, int numWordsInWrappedLines, int numWrappedLines, int offsetBlocks ) : System
text string
containedTextElements Sharpen.BitSet
numWords int
numWordsInAnchorText int
numWordsInWrappedLines int
numWrappedLines int
offsetBlocks int
Résultat System

ToString() public méthode

public ToString ( ) : string
Résultat string

Property Details

EMPTY_END public_oe static_oe property

public static NBoilerpipe.Document.TextBlock EMPTY_END
Résultat NBoilerpipe.Document.TextBlock

EMPTY_START public_oe static_oe property

public static NBoilerpipe.Document.TextBlock EMPTY_START
Résultat NBoilerpipe.Document.TextBlock