PhoneticFlow 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package PhoneticFlow --version 1.0.1
                    
NuGet\Install-Package PhoneticFlow -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PhoneticFlow" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PhoneticFlow" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="PhoneticFlow" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PhoneticFlow --version 1.0.1
                    
#r "nuget: PhoneticFlow, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PhoneticFlow@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PhoneticFlow&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=PhoneticFlow&version=1.0.1
                    
Install as a Cake Tool

PhoneticFlow

PhoneticFlow is a dependency-free .NET 10 (C#) library that converts traditional English spelling into Lytspel, a simplified phonetic spelling system for English (https://lytspel.org). It is a clean-room port of Lytspel (Python/Perl/Haskell) to C#, reusing its dictionary data and core conversion algorithm under the terms of the original ISC license (see LICENSE.txt).

"Hello world. This is a simple example of phonetic English spelling."
->
"Heló wurld. Thiss is a simpl egzampl ov fonetic Inglish speling."

Project layout

src/
├── PhoneticFlow.slnx          Solution file
├── LICENSE.txt, README.md, .gitignore
├── PhoneticFlow/               Class library (the NuGet package)
│   └── data/phoneticflow-dict.csv
├── PhoneticFlow.Tests/         xUnit tests
└── PhoneticFlow.Sample/        Minimal console app demonstrating usage

All commands below are run from inside src/ (where PhoneticFlow.slnx lives).

Note: PhoneticFlow/LICENSE.txt and PhoneticFlow/README.md are copies of the files at the root of src/, kept alongside the .csproj. dotnet pack embeds them in the NuGet package; referencing files outside the project directory for this purpose has been observed to fail with NU5019 on some SDK versions, so local copies are used instead. Keep both copies in sync when editing.

Installing

Once published, the package can be installed with:

dotnet add package PhoneticFlow

Usage

using PhoneticFlow;

var converter = new PhoneticConverter();
string result = converter.Convert("Hello world.");
// "Heló wurld."

PhoneticConverter is stateful (it tracks sentence boundaries across calls), so create one instance per logical document/thread and reuse it as you convert successive paragraphs. Call Reset() to clear sentence-boundary tracking when starting an unrelated piece of text.

Looking up individual words

var dict = PhoneticDictionary.Shared;
string? converted = dict.Lookup("hello"); // "heló"
string? unknown = dict.Lookup("zzzznotaword"); // null

Custom part-of-speech resolution

Some words have more than one Lytspel spelling depending on their grammatical role — for example "abstract" (adjective/noun "ábstract" vs. verb "abstract"), or "I" (pronoun "Y" vs. other readings of "i"). The original Lytspel resolves this using NLP-based part-of-speech tagging (spaCy). PhoneticFlow does not bundle an NLP dependency; instead it uses a deterministic default — prefer the noun reading, then fall back through adjective/adverb/preposition/verb forms — which is documented as a known simplification.

If you have access to real POS tags (from your own NLP pipeline, or because you already know the grammatical role of specific words), you can plug in your own resolution strategy:

PosResolver preferVerb = (word, variants) =>
    variants.TryGetValue("v", out var verbForm) ? verbForm : variants.Values.First();

var dict = new PhoneticDictionary(preferVerb);
var converter = new PhoneticConverter(dict);

Known limitations (v1)

  • No part-of-speech tagging. Ambiguous words default to a deterministic noun-first heuristic instead of true grammatical analysis (see above). The most noticeable case is the pronoun "I", which the original Lytspel always respells as "Y" but which PhoneticFlow may render as "I" unless you supply a custom PosResolver.
  • Plain text only. HTML and EPUB conversion (supported by the original Python tool) are not included in this version.
  • No web component, by design — PhoneticFlow is a library only.

Building from source

cd src
dotnet build PhoneticFlow.slnx
dotnet test PhoneticFlow.slnx
dotnet run --project PhoneticFlow.Sample

Packing the NuGet package

dotnet pack PhoneticFlow/PhoneticFlow.csproj -c Release -o ../artifacts

This produces PhoneticFlow.<version>.nupkg (and a .snupkg symbols package) in ../artifacts, ready to push to NuGet.org or a private feed:

dotnet nuget push ../artifacts/PhoneticFlow.<version>.nupkg \
  --api-key <YOUR_API_KEY> \
  --source https://api.nuget.org/v3/index.json

Attribution

The phonetic dictionary (PhoneticFlow/data/phoneticflow-dict.csv, ~107,000 entries) and the core conversion algorithm are derived from the Lytspel project by Christian Siefkes, licensed under the ISC license. See LICENSE.txt for the full notice.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0 123 6/23/2026
1.0.1 110 6/21/2026
1.0.0 107 6/21/2026