C# Класс 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.
Наследование: ICloneable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
EMPTY_END NBoilerpipe.Document.TextBlock
EMPTY_START NBoilerpipe.Document.TextBlock

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
InitDensities ( ) : void

Описание методов

AddLabel() публичный Метод

Adds an arbitrary String label to this TextBlock .
public AddLabel ( string label ) : void
label string The label
Результат void

AddLabels() публичный Метод

Adds a set of labels to this TextBlock . null-references are silently ignored.
public AddLabels ( ) : void
Результат void

AddLabels() публичный Метод

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.
Результат void

Clone() публичный Метод

public Clone ( ) : Object
Результат Object

GetContainedTextElements() публичный Метод

Returns the containedTextElements BitSet, or null.
Returns the containedTextElements BitSet, or null.
public GetContainedTextElements ( ) : BitSet
Результат Sharpen.BitSet

GetLabels() публичный Метод

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
Результат ICollection

GetLinkDensity() публичный Метод

public GetLinkDensity ( ) : float
Результат float

GetNumWords() публичный Метод

public GetNumWords ( ) : int
Результат int

GetNumWordsInAnchorText() публичный Метод

public GetNumWordsInAnchorText ( ) : int
Результат int

GetOffsetBlocksEnd() публичный Метод

public GetOffsetBlocksEnd ( ) : int
Результат int

GetOffsetBlocksStart() публичный Метод

public GetOffsetBlocksStart ( ) : int
Результат int

GetTagLevel() публичный Метод

public GetTagLevel ( ) : int
Результат int

GetText() публичный Метод

public GetText ( ) : string
Результат string

GetTextDensity() публичный Метод

public GetTextDensity ( ) : float
Результат float

HasLabel() публичный Метод

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
Результат bool

IsContent() публичный Метод

public IsContent ( ) : bool
Результат bool

MergeNext() публичный Метод

public MergeNext ( NBoilerpipe other ) : void
other NBoilerpipe
Результат void

RemoveLabel() публичный Метод

public RemoveLabel ( string label ) : bool
label string
Результат bool

SetIsContent() публичный Метод

public SetIsContent ( bool isContent ) : bool
isContent bool
Результат bool

SetTagLevel() публичный Метод

public SetTagLevel ( int tagLevel ) : void
tagLevel int
Результат void

TextBlock() публичный Метод

public TextBlock ( string text ) : System
text string
Результат System

TextBlock() публичный Метод

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
Результат System

ToString() публичный Метод

public ToString ( ) : string
Результат string

Описание свойств

EMPTY_END публичное статическое свойство

public static NBoilerpipe.Document.TextBlock EMPTY_END
Результат NBoilerpipe.Document.TextBlock

EMPTY_START публичное статическое свойство

public static NBoilerpipe.Document.TextBlock EMPTY_START
Результат NBoilerpipe.Document.TextBlock