Hfst.net
C# version of HFST for .NET projects
Install / Use
/learn @mikahama/Hfst.netREADME
HFST.net
A C# implementation of HFST. The code is based on HFST for Java.
Installation
You can install the NuGet package in Visual Studio or use the command-line tools
dotnet add package MikaHamalainen.hfst
After installing the package, you can import it like this:
using hfst;
Usage
You can load a transducer like this
var transducerFile = "/path/to/transducer.hfstol";
var t = new HFST(transducerFile);
HFST can be initialized with a string path, FileStream or BinaryReader.
You can run the transducer like so:
var analyses = t.Lookup("koira+N+Sg+Ine");
foreach (var analysis in analyses)
{
Console.WriteLine($"{input}\t{analysis}\t{analysis.Weight}");
}
Output:
koira+N+Sg+Ine koirassa 0
You can get the analysis as a string by calling analysis.ToString()
Cite
If you use this in your academic work, you can cite the library like this:
Hämäläinen, M. (2024). HFST.NET - A C# implementation of HFST. Zenodo. https://doi.org/10.5281/zenodo.10685259
@software{hamalainen_2024_10685259,
author = {Hämäläinen, Mika},
title = {HFST.NET - A C\# implementation of HFST},
month = feb,
year = 2024,
publisher = {Zenodo},
doi = {10.5281/zenodo.10685259},
url = {https://doi.org/10.5281/zenodo.10685259}
}
Related Skills
node-connect
354.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
112.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
354.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
354.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
