LanguageTeller 0.1.0
dotnet add package LanguageTeller --version 0.1.0
NuGet\Install-Package LanguageTeller -Version 0.1.0
<PackageReference Include="LanguageTeller" Version="0.1.0" />
paket add LanguageTeller --version 0.1.0
#r "nuget: LanguageTeller, 0.1.0"
// Install LanguageTeller as a Cake Addin #addin nuget:?package=LanguageTeller&version=0.1.0 // Install LanguageTeller as a Cake Tool #tool nuget:?package=LanguageTeller&version=0.1.0
A basic C# port of Fasttext, a library to identify the languages used to write a text.
What and Why
This library supports the .NET Standard 2.0 and 2.1. This library exists only because I wanted a version of the library without relying on the original library in C. If you do not care about that, you most likely prefer a library that is just a wrapper of the original library. I could not find a package like that on nuget, so here we are.
This library only supports using an existing model rather than creating a new one.
This library distributes the original compressed version of the model developed by Facebook.
Performance is good enough for the compressed version of the library. The performance for tests of the full model is bad (it takes more than an hour to run them). I am not sure why. However, using the full model the performance is as expected.
Installation
Install using the NuGet package.
PM> Install-Package LanguageTeller
Usage
Initializing the main class, LanguageTeller
, automatically loads the default model. Then you can use:
TellLanguage
method, to identify the most likely language for a piece of text (or input stream).TellMainLanguages
method, to identify the most likely languages of a piece of text (or input stream). By default this means languages thar are at least a 20% match. This value can be changed using the propertyThresholdMainLanguage
.TellAllanguages
method, to identify all the potential languages for a piece of text (or input stream).
There are also utility method to check a model or load your own. You might also be interested in GetLabels
which lists the labels used by a model.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- MathNet.Numerics (>= 5.0.0)
- System.Memory (>= 4.6.0)
-
.NETStandard 2.1
- MathNet.Numerics (>= 5.0.0)
- System.Memory (>= 4.6.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LanguageTeller:
Package | Downloads |
---|---|
SmartReader.NaturalLanguageProcessing
SmartReader is A .NET Standard library to extract the main content of a web page. This package adds natural language processing support to the library to improve the metadata about the article (e.g. determining the language of the article). |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on LanguageTeller:
Repository | Stars |
---|---|
Strumenta/SmartReader
SmartReader is a library to extract the main content of a web page, based on a port of the Readability library by Mozilla
|
Version | Downloads | Last updated |
---|---|---|
0.1.0 | 71 | 2/2/2025 |