using System.Text.Json.Serialization;
using LLama.Common;
namespace LLama.Abstractions
{
///
/// An interface for text transformations.
/// These can be used to compose a pipeline of text transformations, such as:
/// - Tokenization
/// - Lowercasing
/// - Punctuation removal
/// - Trimming
/// - etc.
///
[JsonConverter(typeof(PolymorphicJSONConverter))]
public interface ITextTransform
{
///
/// Takes a string and transforms it.
///
///
///
string Transform(string text);
///
/// Copy the transform.
///
///
ITextTransform Clone();
}
}