Freigeben über


TextChunker.SplitPlainTextLines Method

Definition

Split plain text into lines.

public static System.Collections.Generic.List<string> SplitPlainTextLines (string text, int maxTokensPerLine, Microsoft.SemanticKernel.Text.TextChunker.TokenCounter? tokenCounter = default);
static member SplitPlainTextLines : string * int * Microsoft.SemanticKernel.Text.TextChunker.TokenCounter -> System.Collections.Generic.List<string>
Public Shared Function SplitPlainTextLines (text As String, maxTokensPerLine As Integer, Optional tokenCounter As TextChunker.TokenCounter = Nothing) As List(Of String)

Parameters

text
String

Text to split

maxTokensPerLine
Int32

Maximum number of tokens per line.

tokenCounter
TextChunker.TokenCounter

Function to count tokens in a string. If not supplied, the default counter will be used.

Returns

List of lines.

Applies to