Property MaxContentWords
- Namespace
- LMKit.TextGeneration
- Assembly
- LM-Kit.NET.dll
MaxContentWords
Gets or sets the maximum number of words allowed in the summarized content. Value is constrained between 0 and 2000 words.
public int MaxContentWords { get; set; }
Property Value
- int
The default value is 200.
Examples
// Increase the maximum content words if summarizing a very long article.
var model = new LMKit.Model.LM("news-model.gguf");
var summarizer = new LMKit.TextGeneration.Summarizer(model)
{
MaxContentWords = 500 // Allow more words in the summary
};
string article = File.ReadAllText("long-news-article.txt");
var result = summarizer.Summarize(article);
Console.WriteLine("Summarized content length: " + result.Content.Split(' ').Length);
Console.WriteLine("Summary: " + result.Content);