Property TextShrinkingStrategy
- Namespace
- LMKit.TextAnalysis
- Assembly
- LM-Kit.NET.dll
TextShrinkingStrategy
Gets or sets the strategy used to shrink content when the input exceeds the defined MaximumContextLength.
Different strategies trade off between preserving semantic integrity and aggressively reducing length. For example:
- Auto: Automatically selects the best approach.
- RemoveWords: Removes less important words without losing the overall structure.
- RemoveLines: Removes entire lines at random.
- SummarizeText: Summarizes and condenses the text.
- TrimTop or TrimBottom: Trims content from the top or bottom.
By choosing the appropriate shrinking strategy, you can ensure that the input remains within the allowable context window while retaining the key information necessary for accurate keyword extraction.
public TextShrinkingStrategy TextShrinkingStrategy { get; set; }
Property Value
Examples
extractor.TextShrinkingStrategy = TextShrinkingStrategy.RemoveWords;
Console.WriteLine("Selected Text Shrinking Strategy: " + extractor.TextShrinkingStrategy);