vomark 1.0.0
See the version list below for details.
dotnet add package vomark --version 1.0.0
NuGet\Install-Package vomark -Version 1.0.0
<PackageReference Include="vomark" Version="1.0.0" />
<PackageVersion Include="vomark" Version="1.0.0" />
<PackageReference Include="vomark" />
paket add vomark --version 1.0.0
#r "nuget: vomark, 1.0.0"
#:package vomark@1.0.0
#addin nuget:?package=vomark&version=1.0.0
#tool nuget:?package=vomark&version=1.0.0
vomark
A markov-chain based random sentence generator library. Create a "brain" that you can feed a vocabulary and reproduce sentences! NOTE: This is NOT an LLM, and does not use any other data than what you specifically answer. It literally only uses the words you give it and reproduces patterns given a vocabulary.
Features
- Each entity comprises of a VomBrain, VomContext, and VomSettings.
- A VomBrain maps a label to a weighted graph representing an associated vocabulary.
- A VomContext can be used to represent style and emotion, notably through capitalization and punctuation.
- VomSettings are used to manage a max word-count per sentence, as well as settings for YouTube integration.
- Entities can be fed data from raw strings, .txt files, or YouTube videos/playlists.
Installation
Vomark can be installed as a NuGet package:
Install-Package vomark
YouTube integration features are dependent on YoutubeDLSharp, and conversely require yt-dlp and ffmpeg.
Both packages can be installed within the library by running the following:
bool success = await YTIntegration.SetupPackages(path);
Usage
Creating a fresh VomBrain:
VomBrain vb = new();
Adding a graph to a VomBrain:
string ex = "This is an example string."
vb.AddNewGraph("example", ex);
// Existing graphs can append data as such:
string ex2 = "This is a second string."
vb.AddThoughtRaw("example", ex2);
When using .txt files, instead use AddThoughtTxt()
and use the path instead of the data.
Returning a sentence from the VomBrain:
Console.WriteLine(vb.FormThought("example"));
When forming sentences from a VomBrain, it uses the maximum word length from the associated settings object as well as capitalization/punctuation from the context object.
Changing the settings and context:
vb.Settings = new(
ytDl: "../ytlibs",
ytOut = "../vidOut",
subLang = "en",
maxLen = 16
);
VomContext Angry = new(
"angry", Punctuation.TRIPEXC, Capitalization.ALLCAPS
);
vb.Context = Angry;
YouTube Integration
If YoutubeDLSharp and all dependencies are installed, then you can use YouTube videos and playlists as data sources for VomBrains. When using YT features, ensure that your VomBrain settings are applied correctly. This ensures that your ytDl points to the folder containing yt-dlp.exe and ffmpeg.exe.
A Quick Warning on Subtitles
The vomark library requires that a YouTube video have at least one SRT file in the given language in order to be read. Many automated subtitles will work fine with vomark, but custom-made subtitles are not forced to follow any particular standard. All text between brackets and parentheses are removed, so sentence structures may become awkward. YouTube automatically censors certain language, so it can create gaps in speech and unexpected connections between words.
Adding a YouTube video to a graph:
await vb.AddThoughtYt("example", "example_url_");
// Adding a playlist follows the same format, but uses
// await vb.AddThoughtPlaylistYt("example", "example_url_");
Tests
Testing is implemented locally in a separate project using xUnit.
License
This project is licensed under the BSD-3 Claude License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- System.Configuration.ConfigurationManager (>= 9.0.8)
- YoutubeDLSharp (>= 1.1.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.