Initializes a new instance of the HighlightOptions class which is used to extract a fixed-length highlight.
def__init__(self):...
init
Initializes a new HighlightOptions instance used to extract a fixed-length highlight.
def__init__(self,max_length):...
Parameter
Type
Description
max_length
int
The maximum text length.
init
Initializes a new instance of the HighlightOptions class which is used to extract a line‑limited highlight.
def__init__(self,max_length,is_line_limited):...
Parameter
Type
Description
max_length
Optional[int]
The maximum text length.
is_line_limited
bool
Indicates whether the highlight extraction is limited by the start (or the end) of a text line.
Example
fromgroupdocs.parser.optionsimportHighlightOptions# Create options to extract a highlight with a maximum length of 200 characters,# limiting the highlight to the start/end of a line.options=HighlightOptions(max_length=200,is_line_limited=True)
init
Initializes a new HighlightOptions instance used to extract a highlight with a fixed word count.