Panlingo.LanguageIdentification.MediaPipe
0.6.0
dotnet add package Panlingo.LanguageIdentification.MediaPipe --version 0.6.0
NuGet\Install-Package Panlingo.LanguageIdentification.MediaPipe -Version 0.6.0
<PackageReference Include="Panlingo.LanguageIdentification.MediaPipe" Version="0.6.0" />
<PackageVersion Include="Panlingo.LanguageIdentification.MediaPipe" Version="0.6.0" />
<PackageReference Include="Panlingo.LanguageIdentification.MediaPipe" />
paket add Panlingo.LanguageIdentification.MediaPipe --version 0.6.0
#r "nuget: Panlingo.LanguageIdentification.MediaPipe, 0.6.0"
#addin nuget:?package=Panlingo.LanguageIdentification.MediaPipe&version=0.6.0
#tool nuget:?package=Panlingo.LanguageIdentification.MediaPipe&version=0.6.0
Panlingo.LanguageIdentification.MediaPipe
Welcome to Panlingo.LanguageIdentification.MediaPipe, a .NET wrapper for the MediaPipe library by Google Inc. This package seamlessly integrates language identification capabilities into .NET applications, enabling accurate and efficient recognition of over 107 languages with minimal effort. Perfect for applications dealing with multilingual texts or requiring automatic language detection.
Requirements
- Runtime: .NET >= 5.0
- OS: Linux (Ubuntu, Debian), Windows 10+ or Windows Server 2019+, macOS
- Arch: AMD64 (or ARM for macOS)
Installation
To integrate the MediaPipe functionality, follow these steps:
Install the NuGet package:
dotnet add package Panlingo.LanguageIdentification.MediaPipe
Usage
Integrating the MediaPipe library into your .NET application is straightforward. Here’s a quick guide to get you started:
- Install the Package: Ensure you have added the
Panlingo.LanguageIdentification.MediaPipe
package to your project using the provided installation command. - Initialize the Library: Follow the example snippet to initialize and use the MediaPipe library for detecting languages.
using Panlingo.LanguageIdentification.MediaPipe;
class Program
{
static void Main()
{
using var mediaPipe = new MediaPipeDetector(
options: MediaPipeOptions.FromDefault()
);
var text = "Привіт, як справи?";
var predictions = mediaPipe.PredictLanguages(text);
foreach (var prediction in predictions)
{
Console.WriteLine(
$"Language: {prediction.Language}, " +
$"Probability: {prediction.Probability}"
);
}
}
}
Custom models
Download the Pretrained Models
Download the pretrained language identification (LID) model provided by Google:
curl --location -o /models/mediapipe_language_detector.tflite https://storage.googleapis.com/mediapipe-models/language_detector/language_detector/float32/1/language_detector.tflite
Learn more about this model here:
Use custom model in code
You can use the model included in this NuGet package:
using var mediaPipe = new MediaPipeDetector(
options: MediaPipeOptions.FromDefault()
);
You can specify the path to the model file:
var modelPath = "/models/mediapipe_language_detector.tflite";
using var mediaPipe = new MediaPipeDetector(
options: MediaPipeOptions.FromFile(modelPath)
);
Also you can also load the model as a memory stream:
var modelPath = "/models/mediapipe_language_detector.tflite";
using var stream = File.Open(modelPath, FileMode.Open);
using var mediaPipe = new MediaPipeDetector(
options: MediaPipeOptions.FromStream(stream)
);
Sources
- Original MediaPipe Repository
- Language detection guide
- Language detector (model card)
- Language identification at Wikipedia
License
This project is licensed under the MIT License © 2024–2025 Alexander Gluschenko.
Includes software from the following project(s):
- MediaPipe Language Detector — © 2023–2025 Google Inc., licensed under Apache-2.0
See the LICENSE file for full details.
We value your feedback. Feel free to open issues or contribute to the repository. Let’s make language detection in .NET even more powerful and versatile! 🌍📝
Happy coding! 👩💻👨💻
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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 is compatible. 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. |
-
net5.0
-
net6.0
-
net7.0
-
net8.0
-
net9.0
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 |
---|---|---|
0.6.0 | 12 | 7/1/2025 |
0.5.0 | 149 | 6/18/2025 |
0.4.0 | 344 | 1/20/2025 |
0.3.0 | 180 | 12/15/2024 |
0.2.0 | 168 | 11/10/2024 |
0.1.1 | 234 | 10/22/2024 |
0.0.0.23 | 132 | 10/7/2024 |
0.0.0.22 | 383 | 9/22/2024 |
0.0.0.21 | 152 | 9/10/2024 |
0.0.0.20 | 128 | 9/8/2024 |
0.0.0.19 | 160 | 9/1/2024 |
0.0.0.18 | 117 | 8/26/2024 |
0.0.0.17 | 147 | 8/21/2024 |
0.0.0.16 | 162 | 8/9/2024 |
0.4.0.0
- Add GetLabels method
0.0.0.21:
- Default MediaPipe model is included in NuGet package
0.0.0.10:
- Initial release