From 2581492fce2dcd2cbad403644ec2c3066f74eec9 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Wed, 22 May 2024 12:34:17 +1000 Subject: [PATCH] Allow comparison between detectors Allow --compare flag to be supported for ./build report command to seed detectors with the same subset of languages supported by all --- .gitignore | 1 + build/Build/Program.cs | 36 ++++-- .../Comparison/ComparisonTests.cs | 3 +- .../GlobalUsings.cs | 2 + .../AfrikaansDetectionAccuracyReport.cs | 9 +- .../AlbanianDetectionAccuracyReport.cs | 9 +- .../AmharicDetectionAccuracyReport.cs | 24 ---- .../ArabicDetectionAccuracyReport.cs | 9 +- .../ArmenianDetectionAccuracyReport.cs | 24 ---- .../AzerbaijaniDetectionAccuracyReport.cs | 24 ---- .../BasqueDetectionAccuracyReport.cs | 24 ---- .../BelarusianDetectionAccuracyReport.cs | 24 ---- .../BengaliDetectionAccuracyReport.cs | 9 +- .../BokmalDetectionAccuracyReport.cs | 9 +- .../BosnianDetectionAccuracyReport.cs | 24 ---- .../BulgarianDetectionAccuracyReport.cs | 9 +- .../CatalanDetectionAccuracyReport.cs | 24 ---- .../ChineseDetectionAccuracyReport.cs | 9 +- .../CroatianDetectionAccuracyReport.cs | 9 +- .../CzechDetectionAccuracyReport.cs | 9 +- .../DanishDetectionAccuracyReport.cs | 9 +- .../DutchDetectionAccuracyReport.cs | 9 +- .../EnglishDetectionAccuracyReport.cs | 9 +- .../EsperantoDetectionAccuracyReport.cs | 24 ---- .../EstonianDetectionAccuracyReport.cs | 9 +- .../FinnishDetectionAccuracyReport.cs | 9 +- .../FrenchDetectionAccuracyReport.cs | 9 +- .../GandaDetectionAccuracyReport.cs | 24 ---- .../GeorgianDetectionAccuracyReport.cs | 24 ---- .../GermanDetectionAccuracyReport.cs | 9 +- .../GreekDetectionAccuracyReport.cs | 9 +- .../GujaratiDetectionAccuracyReport.cs | 9 +- .../HebrewDetectionAccuracyReport.cs | 9 +- .../HindiDetectionAccuracyReport.cs | 9 +- .../HungarianDetectionAccuracyReport.cs | 9 +- .../IcelandicDetectionAccuracyReport.cs | 24 ---- .../IndonesianDetectionAccuracyReport.cs | 9 +- .../IrishDetectionAccuracyReport.cs | 24 ---- .../ItalianDetectionAccuracyReport.cs | 9 +- .../JapaneseDetectionAccuracyReport.cs | 9 +- .../KazakhDetectionAccuracyReport.cs | 24 ---- .../KoreanDetectionAccuracyReport.cs | 9 +- .../LatinDetectionAccuracyReport.cs | 24 ---- .../LatvianDetectionAccuracyReport.cs | 9 +- .../LithuanianDetectionAccuracyReport.cs | 9 +- .../MacedonianDetectionAccuracyReport.cs | 9 +- .../MalayDetectionAccuracyReport.cs | 24 ---- .../MaoriDetectionAccuracyReport.cs | 24 ---- .../MarathiDetectionAccuracyReport.cs | 9 +- .../MongolianDetectionAccuracyReport.cs | 24 ---- .../NynorskDetectionAccuracyReport.cs | 9 +- .../OromoDetectionAccuracyReport.cs | 24 ---- .../PersianDetectionAccuracyReport.cs | 9 +- .../PolishDetectionAccuracyReport.cs | 9 +- .../PortugueseDetectionAccuracyReport.cs | 9 +- .../PunjabiDetectionAccuracyReport.cs | 9 +- .../RomanianDetectionAccuracyReport.cs | 9 +- .../RussianDetectionAccuracyReport.cs | 9 +- .../SerbianDetectionAccuracyReport.cs | 24 ---- .../ShonaDetectionAccuracyReport.cs | 24 ---- .../SinhalaDetectionAccuracyReport.cs | 24 ---- .../SlovakDetectionAccuracyReport.cs | 9 +- .../SloveneDetectionAccuracyReport.cs | 9 +- .../SomaliDetectionAccuracyReport.cs | 9 +- .../SothoDetectionAccuracyReport.cs | 24 ---- .../SpanishDetectionAccuracyReport.cs | 9 +- .../SwahiliDetectionAccuracyReport.cs | 9 +- .../SwedishDetectionAccuracyReport.cs | 9 +- .../TagalogDetectionAccuracyReport.cs | 9 +- .../TamilDetectionAccuracyReport.cs | 9 +- .../TeluguDetectionAccuracyReport.cs | 9 +- .../ThaiDetectionAccuracyReport.cs | 9 +- .../TigrinyaDetectionAccuracyReport.cs | 24 ---- .../TsongaDetectionAccuracyReport.cs | 24 ---- .../TswanaDetectionAccuracyReport.cs | 24 ---- .../TurkishDetectionAccuracyReport.cs | 9 +- .../UkrainianDetectionAccuracyReport.cs | 9 +- .../UrduDetectionAccuracyReport.cs | 9 +- .../VietnameseDetectionAccuracyReport.cs | 9 +- .../WelshDetectionAccuracyReport.cs | 24 ---- .../XhosaDetectionAccuracyReport.cs | 24 ---- .../YorubaDetectionAccuracyReport.cs | 24 ---- .../ZuluDetectionAccuracyReport.cs | 24 ---- .../LanguageDetectionLanguageDetector.cs | 6 +- ...anguageDetectionLanguageDetectorFactory.cs | 15 ++- .../LanguageDetectionStatistics.cs | 23 +++- .../AfrikaansDetectionAccuracyReport.cs | 9 +- .../Lingua/AlbanianDetectionAccuracyReport.cs | 9 +- .../Lingua/AmharicDetectionAccuracyReport.cs | 9 +- .../Lingua/ArabicDetectionAccuracyReport.cs | 9 +- .../Lingua/ArmenianDetectionAccuracyReport.cs | 9 +- .../AzerbaijaniDetectionAccuracyReport.cs | 9 +- .../Lingua/BasqueDetectionAccuracyReport.cs | 9 +- .../BelarusianDetectionAccuracyReport.cs | 9 +- .../Lingua/BengaliDetectionAccuracyReport.cs | 9 +- .../Lingua/BokmalDetectionAccuracyReport.cs | 9 +- .../Lingua/BosnianDetectionAccuracyReport.cs | 9 +- .../BulgarianDetectionAccuracyReport.cs | 9 +- .../Lingua/CatalanDetectionAccuracyReport.cs | 9 +- .../Lingua/ChineseDetectionAccuracyReport.cs | 9 +- .../Lingua/CroatianDetectionAccuracyReport.cs | 9 +- .../Lingua/CzechDetectionAccuracyReport.cs | 9 +- .../Lingua/DanishDetectionAccuracyReport.cs | 9 +- .../Lingua/DutchDetectionAccuracyReport.cs | 9 +- .../Lingua/EnglishDetectionAccuracyReport.cs | 9 +- .../EsperantoDetectionAccuracyReport.cs | 9 +- .../Lingua/EstonianDetectionAccuracyReport.cs | 9 +- .../Lingua/FinnishDetectionAccuracyReport.cs | 9 +- .../Lingua/FrenchDetectionAccuracyReport.cs | 9 +- .../Lingua/GandaDetectionAccuracyReport.cs | 9 +- .../Lingua/GeorgianDetectionAccuracyReport.cs | 9 +- .../Lingua/GermanDetectionAccuracyReport.cs | 9 +- .../Lingua/GreekDetectionAccuracyReport.cs | 9 +- .../Lingua/GujaratiDetectionAccuracyReport.cs | 9 +- .../Lingua/HebrewDetectionAccuracyReport.cs | 9 +- .../Lingua/HindiDetectionAccuracyReport.cs | 9 +- .../HungarianDetectionAccuracyReport.cs | 9 +- .../IcelandicDetectionAccuracyReport.cs | 9 +- .../IndonesianDetectionAccuracyReport.cs | 9 +- .../Lingua/IrishDetectionAccuracyReport.cs | 9 +- .../Lingua/ItalianDetectionAccuracyReport.cs | 9 +- .../Lingua/JapaneseDetectionAccuracyReport.cs | 9 +- .../Lingua/KazakhDetectionAccuracyReport.cs | 9 +- .../Lingua/KoreanDetectionAccuracyReport.cs | 9 +- .../Lingua/LatinDetectionAccuracyReport.cs | 9 +- .../Lingua/LatvianDetectionAccuracyReport.cs | 9 +- .../LithuanianDetectionAccuracyReport.cs | 9 +- .../MacedonianDetectionAccuracyReport.cs | 9 +- .../Lingua/MalayDetectionAccuracyReport.cs | 9 +- .../Lingua/MaoriDetectionAccuracyReport.cs | 9 +- .../Lingua/MarathiDetectionAccuracyReport.cs | 9 +- .../MongolianDetectionAccuracyReport.cs | 9 +- .../Lingua/NynorskDetectionAccuracyReport.cs | 9 +- .../Lingua/OromoDetectionAccuracyReport.cs | 9 +- .../Lingua/PersianDetectionAccuracyReport.cs | 9 +- .../Lingua/PolishDetectionAccuracyReport.cs | 9 +- .../PortugueseDetectionAccuracyReport.cs | 9 +- .../Lingua/PunjabiDetectionAccuracyReport.cs | 9 +- .../Lingua/RomanianDetectionAccuracyReport.cs | 9 +- .../Lingua/RussianDetectionAccuracyReport.cs | 9 +- .../Lingua/SerbianDetectionAccuracyReport.cs | 9 +- .../Lingua/ShonaDetectionAccuracyReport.cs | 9 +- .../Lingua/SinhalaDetectionAccuracyReport.cs | 9 +- .../Lingua/SlovakDetectionAccuracyReport.cs | 9 +- .../Lingua/SloveneDetectionAccuracyReport.cs | 9 +- .../Lingua/SomaliDetectionAccuracyReport.cs | 9 +- .../Lingua/SothoDetectionAccuracyReport.cs | 9 +- .../Lingua/SpanishDetectionAccuracyReport.cs | 9 +- .../Lingua/SwahiliDetectionAccuracyReport.cs | 9 +- .../Lingua/SwedishDetectionAccuracyReport.cs | 9 +- .../Lingua/TagalogDetectionAccuracyReport.cs | 9 +- .../Lingua/TamilDetectionAccuracyReport.cs | 9 +- .../Lingua/TeluguDetectionAccuracyReport.cs | 9 +- .../Lingua/ThaiDetectionAccuracyReport.cs | 9 +- .../Lingua/TigrinyaDetectionAccuracyReport.cs | 9 +- .../Lingua/TsongaDetectionAccuracyReport.cs | 9 +- .../Lingua/TswanaDetectionAccuracyReport.cs | 9 +- .../Lingua/TurkishDetectionAccuracyReport.cs | 9 +- .../UkrainianDetectionAccuracyReport.cs | 9 +- .../Lingua/UrduDetectionAccuracyReport.cs | 9 +- .../VietnameseDetectionAccuracyReport.cs | 9 +- .../Lingua/WelshDetectionAccuracyReport.cs | 9 +- .../Lingua/XhosaDetectionAccuracyReport.cs | 9 +- .../Lingua/YorubaDetectionAccuracyReport.cs | 9 +- .../Lingua/ZuluDetectionAccuracyReport.cs | 9 +- .../LinguaLanguageDetectorFactory.cs | 14 ++- .../NTextCat/BokmalDetectionAccuracyReport.cs | 8 +- .../ChineseDetectionAccuracyReport.cs | 8 +- .../NTextCat/DanishDetectionAccuracyReport.cs | 8 +- .../NTextCat/DutchDetectionAccuracyReport.cs | 8 +- .../EnglishDetectionAccuracyReport.cs | 8 +- .../NTextCat/FrenchDetectionAccuracyReport.cs | 8 +- .../NTextCat/GermanDetectionAccuracyReport.cs | 8 +- .../ItalianDetectionAccuracyReport.cs | 8 +- .../JapaneseDetectionAccuracyReport.cs | 8 +- .../NTextCat/KoreanDetectionAccuracyReport.cs | 8 +- .../NynorskDetectionAccuracyReport.cs | 8 +- .../PortugueseDetectionAccuracyReport.cs | 8 +- .../RussianDetectionAccuracyReport.cs | 8 +- .../SpanishDetectionAccuracyReport.cs | 8 +- .../SwedishDetectionAccuracyReport.cs | 8 +- .../NTextCatLanguageDetector.cs | 21 +--- .../NTextCatLanguageDetectorFactory.cs | 30 +++++ .../ReportTheory.cs | 34 ++++++ .../SupportedLanguages.cs | 105 ++++++++++++++++++ .../TextFileDataAttribute.cs | 5 + .../Lingua.Benchmarks.csproj | 4 + 187 files changed, 691 insertions(+), 1585 deletions(-) create mode 100644 tests/Lingua.AccuracyReport.Tests/GlobalUsings.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/AmharicDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArmenianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/AzerbaijaniDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/BasqueDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/BelarusianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/BosnianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/CatalanDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/EsperantoDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/GandaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/GeorgianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/IcelandicDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/IrishDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/KazakhDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatinDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/MalayDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/MaoriDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/MongolianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/OromoDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/SerbianDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/ShonaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/SinhalaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/SothoDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/TigrinyaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/TsongaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/TswanaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/WelshDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/XhosaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/YorubaDetectionAccuracyReport.cs delete mode 100644 tests/Lingua.AccuracyReport.Tests/LanguageDetection/ZuluDetectionAccuracyReport.cs create mode 100644 tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetectorFactory.cs create mode 100644 tests/Lingua.AccuracyReport.Tests/ReportTheory.cs create mode 100644 tests/Lingua.AccuracyReport.Tests/SupportedLanguages.cs diff --git a/.gitignore b/.gitignore index 1d81824..b163b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ riderModule.iml /_ReSharper.Caches/ .idea +.vs *.sln.DotSettings.User nuget diff --git a/build/Build/Program.cs b/build/Build/Program.cs index 8dfefdc..8c78484 100644 --- a/build/Build/Program.cs +++ b/build/Build/Program.cs @@ -11,18 +11,23 @@ var language = new Option(["--language"], "languages to generate an accuracy report for") { - Arity = ArgumentArity.ZeroOrMore + Arity = ArgumentArity.ZeroOrMore, }; var detector = new Option(["--implementation"], "implementations to generate an accuracy report for") { Arity = ArgumentArity.ZeroOrMore, }; +detector.FromAmong("Lingua", "NTextCat", "LanguageDetection"); + +var compare = new Option("--compare", + "whether implementations should use the same subset of supported languages when generating an accuracy report"); var cmd = new RootCommand { language, detector, + compare, new Argument("targets") { Description = @@ -90,7 +95,7 @@ { var filter = new StringBuilder(); var languages = cmdLine.GetValueForOption(language); - if (languages is not null) + if (languages?.Length > 0) { foreach (var l in languages) { @@ -104,23 +109,34 @@ } var detectors = cmdLine.GetValueForOption(detector); - if (detectors is not null) + if (detectors?.Length > 0) { - foreach (var d in detectors) + if (filter.Length > 0) + filter.Append(" & "); + + filter.Append('('); + + for (var index = 0; index < detectors.Length; index++) { - if (filter.Length > 0) - filter.Append(" & "); + if (index > 0) + filter.Append(" | "); + var d = detectors[index]; filter.Append("(FullyQualifiedName~."); filter.Append(d); filter.Append(')'); } + + filter.Append(')'); } - Run("dotnet", - filter.Length > 0 - ? $"test tests/Lingua.AccuracyReport.Tests -c Release --no-build --filter \"{filter}\"" - : "test tests/Lingua.AccuracyReport.Tests -c Release --no-build"); + var additionalArgs = new StringBuilder(); + if (cmdLine.GetValueForOption(compare)) + additionalArgs.Append(" --environment TEST_COMPARE=\"true\""); + if (filter.Length > 0) + additionalArgs.Append($" --filter \"{filter}\" --environment TEST_FILTER=\"{filter}\""); + + Run("dotnet", $"test tests/Lingua.AccuracyReport.Tests -c Release{additionalArgs}"); CombinedAccuracyReport.Create(); }); diff --git a/tests/Lingua.AccuracyReport.Tests/Comparison/ComparisonTests.cs b/tests/Lingua.AccuracyReport.Tests/Comparison/ComparisonTests.cs index 9a089e4..12653f4 100644 --- a/tests/Lingua.AccuracyReport.Tests/Comparison/ComparisonTests.cs +++ b/tests/Lingua.AccuracyReport.Tests/Comparison/ComparisonTests.cs @@ -1,7 +1,6 @@ using System.Runtime.InteropServices; using FluentAssertions; -using Xunit; -using static Lingua.Language; + namespace Lingua.AccuracyReport.Tests.Comparison; public class ComparisonTests diff --git a/tests/Lingua.AccuracyReport.Tests/GlobalUsings.cs b/tests/Lingua.AccuracyReport.Tests/GlobalUsings.cs new file mode 100644 index 0000000..7c1d3d4 --- /dev/null +++ b/tests/Lingua.AccuracyReport.Tests/GlobalUsings.cs @@ -0,0 +1,2 @@ +global using Xunit; +global using static Lingua.Language; diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AfrikaansDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AfrikaansDetectionAccuracyReport.cs index 219f759..e0a9ddf 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AfrikaansDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AfrikaansDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class AfrikaansDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Afrikaans, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Afrikaans)] [SingleWordData(Afrikaans)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Afrikaans)] [WordPairsData(Afrikaans)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Afrikaans)] [SentenceData(Afrikaans)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AlbanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AlbanianDetectionAccuracyReport.cs index 6b7b972..7ea8951 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AlbanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AlbanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class AlbanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Albanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Albanian)] [SingleWordData(Albanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Albanian)] [WordPairsData(Albanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Albanian)] [SentenceData(Albanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AmharicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AmharicDetectionAccuracyReport.cs deleted file mode 100644 index 883c240..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AmharicDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class AmharicDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Amharic, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Amharic)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Amharic)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Amharic)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArabicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArabicDetectionAccuracyReport.cs index 771810a..e27332d 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArabicDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArabicDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class ArabicDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Arabic, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Arabic)] [SingleWordData(Arabic)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Arabic)] [WordPairsData(Arabic)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Arabic)] [SentenceData(Arabic)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArmenianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArmenianDetectionAccuracyReport.cs deleted file mode 100644 index cb860d4..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ArmenianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class ArmenianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Armenian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Armenian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Armenian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Armenian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AzerbaijaniDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AzerbaijaniDetectionAccuracyReport.cs deleted file mode 100644 index db7853c..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/AzerbaijaniDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class AzerbaijaniDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Azerbaijani, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Azerbaijani)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Azerbaijani)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Azerbaijani)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BasqueDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BasqueDetectionAccuracyReport.cs deleted file mode 100644 index 7834051..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BasqueDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class BasqueDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Basque, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Basque)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Basque)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Basque)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BelarusianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BelarusianDetectionAccuracyReport.cs deleted file mode 100644 index 99e1a90..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BelarusianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class BelarusianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Belarusian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Belarusian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Belarusian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Belarusian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BengaliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BengaliDetectionAccuracyReport.cs index 6f2ec9d..a14be8a 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BengaliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BengaliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class BengaliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Bengali, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Bengali)] [SingleWordData(Bengali)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Bengali)] [WordPairsData(Bengali)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Bengali)] [SentenceData(Bengali)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BokmalDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BokmalDetectionAccuracyReport.cs index 96f36d2..fc329c0 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BokmalDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BokmalDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class BokmalDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Bokmal, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Bokmal)] [SingleWordData(Bokmal)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Bokmal)] [WordPairsData(Bokmal)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Bokmal)] [SentenceData(Bokmal)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BosnianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BosnianDetectionAccuracyReport.cs deleted file mode 100644 index 18dc169..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BosnianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class BosnianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Bosnian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Bosnian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Bosnian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Bosnian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BulgarianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BulgarianDetectionAccuracyReport.cs index 3b62959..eccc007 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BulgarianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/BulgarianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class BulgarianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Bulgarian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Bulgarian)] [SingleWordData(Bulgarian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Bulgarian)] [WordPairsData(Bulgarian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Bulgarian)] [SentenceData(Bulgarian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CatalanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CatalanDetectionAccuracyReport.cs deleted file mode 100644 index aeae73a..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CatalanDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class CatalanDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Catalan, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Catalan)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Catalan)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Catalan)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ChineseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ChineseDetectionAccuracyReport.cs index ccccbc5..b5020fd 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ChineseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ChineseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class ChineseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Chinese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Chinese)] [SingleWordData(Chinese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Chinese)] [WordPairsData(Chinese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Chinese)] [SentenceData(Chinese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CroatianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CroatianDetectionAccuracyReport.cs index cae75a4..e692f94 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CroatianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CroatianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class CroatianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Croatian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Croatian)] [SingleWordData(Croatian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Croatian)] [WordPairsData(Croatian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Croatian)] [SentenceData(Croatian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CzechDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CzechDetectionAccuracyReport.cs index 04a06d2..cd394d1 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CzechDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/CzechDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class CzechDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Czech, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Czech)] [SingleWordData(Czech)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Czech)] [WordPairsData(Czech)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Czech)] [SentenceData(Czech)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DanishDetectionAccuracyReport.cs index 9bf950a..0b68b0f 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DanishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class DanishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Danish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Danish)] [SingleWordData(Danish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Danish)] [WordPairsData(Danish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Danish)] [SentenceData(Danish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DutchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DutchDetectionAccuracyReport.cs index 427e887..8506c51 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DutchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/DutchDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class DutchDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Dutch, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Dutch)] [SingleWordData(Dutch)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Dutch)] [WordPairsData(Dutch)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Dutch)] [SentenceData(Dutch)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EnglishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EnglishDetectionAccuracyReport.cs index 49861ec..c1b6588 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EnglishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EnglishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class EnglishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(English, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, English)] [SingleWordData(English)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, English)] [WordPairsData(English)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, English)] [SentenceData(English)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EsperantoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EsperantoDetectionAccuracyReport.cs deleted file mode 100644 index 1f95572..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EsperantoDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class EsperantoDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Esperanto, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Esperanto)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Esperanto)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Esperanto)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EstonianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EstonianDetectionAccuracyReport.cs index 46b1505..9fc0c30 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EstonianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/EstonianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class EstonianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Estonian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Estonian)] [SingleWordData(Estonian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Estonian)] [WordPairsData(Estonian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Estonian)] [SentenceData(Estonian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FinnishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FinnishDetectionAccuracyReport.cs index 7fe1f60..58a757f 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FinnishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FinnishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class FinnishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Finnish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Finnish)] [SingleWordData(Finnish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Finnish)] [WordPairsData(Finnish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Finnish)] [SentenceData(Finnish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FrenchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FrenchDetectionAccuracyReport.cs index 2cbab16..14bec93 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FrenchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/FrenchDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class FrenchDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(French, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, French)] [SingleWordData(French)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, French)] [WordPairsData(French)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, French)] [SentenceData(French)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GandaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GandaDetectionAccuracyReport.cs deleted file mode 100644 index 3ee0336..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GandaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class GandaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Ganda, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Ganda)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Ganda)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Ganda)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GeorgianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GeorgianDetectionAccuracyReport.cs deleted file mode 100644 index 37f85d2..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GeorgianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class GeorgianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Georgian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Georgian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Georgian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Georgian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GermanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GermanDetectionAccuracyReport.cs index 595188c..2571dfc 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GermanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GermanDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class GermanDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(German, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, German)] [SingleWordData(German)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, German)] [WordPairsData(German)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, German)] [SentenceData(German)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GreekDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GreekDetectionAccuracyReport.cs index 921a936..5b38dfd 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GreekDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GreekDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class GreekDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Greek, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Greek)] [SingleWordData(Greek)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Greek)] [WordPairsData(Greek)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Greek)] [SentenceData(Greek)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GujaratiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GujaratiDetectionAccuracyReport.cs index 2e2abb1..bfbcfd5 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GujaratiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/GujaratiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class GujaratiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Gujarati, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Gujarati)] [SingleWordData(Gujarati)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Gujarati)] [WordPairsData(Gujarati)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Gujarati)] [SentenceData(Gujarati)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HebrewDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HebrewDetectionAccuracyReport.cs index af9dcc1..d84bf33 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HebrewDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HebrewDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class HebrewDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Hebrew, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Hebrew)] [SingleWordData(Hebrew)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Hebrew)] [WordPairsData(Hebrew)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Hebrew)] [SentenceData(Hebrew)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HindiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HindiDetectionAccuracyReport.cs index b86faac..59b3c11 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HindiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HindiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class HindiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Hindi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Hindi)] [SingleWordData(Hindi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Hindi)] [WordPairsData(Hindi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Hindi)] [SentenceData(Hindi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HungarianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HungarianDetectionAccuracyReport.cs index 79c2c50..14d7788 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HungarianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/HungarianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class HungarianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Hungarian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Hungarian)] [SingleWordData(Hungarian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Hungarian)] [WordPairsData(Hungarian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Hungarian)] [SentenceData(Hungarian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IcelandicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IcelandicDetectionAccuracyReport.cs deleted file mode 100644 index c42bf3c..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IcelandicDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class IcelandicDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Icelandic, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Icelandic)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Icelandic)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Icelandic)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IndonesianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IndonesianDetectionAccuracyReport.cs index 0d9542c..ea6538c 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IndonesianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IndonesianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class IndonesianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Indonesian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Indonesian)] [SingleWordData(Indonesian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Indonesian)] [WordPairsData(Indonesian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Indonesian)] [SentenceData(Indonesian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IrishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IrishDetectionAccuracyReport.cs deleted file mode 100644 index 5bfac38..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/IrishDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class IrishDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Irish, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Irish)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Irish)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Irish)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ItalianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ItalianDetectionAccuracyReport.cs index f8c919a..a40fa26 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ItalianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ItalianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class ItalianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Italian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Italian)] [SingleWordData(Italian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Italian)] [WordPairsData(Italian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Italian)] [SentenceData(Italian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/JapaneseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/JapaneseDetectionAccuracyReport.cs index 6ad67f1..b215200 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/JapaneseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/JapaneseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class JapaneseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Japanese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Japanese)] [SingleWordData(Japanese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Japanese)] [WordPairsData(Japanese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Japanese)] [SentenceData(Japanese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KazakhDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KazakhDetectionAccuracyReport.cs deleted file mode 100644 index 8607484..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KazakhDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class KazakhDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Kazakh, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Kazakh)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Kazakh)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Kazakh)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KoreanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KoreanDetectionAccuracyReport.cs index 4c1e3e7..5395712 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KoreanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/KoreanDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class KoreanDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Korean, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Korean)] [SingleWordData(Korean)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Korean)] [WordPairsData(Korean)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Korean)] [SentenceData(Korean)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatinDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatinDetectionAccuracyReport.cs deleted file mode 100644 index 7a38d80..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatinDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class LatinDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Latin, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Latin)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Latin)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Latin)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatvianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatvianDetectionAccuracyReport.cs index d34b962..bcb55b6 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatvianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LatvianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class LatvianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Latvian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Latvian)] [SingleWordData(Latvian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Latvian)] [WordPairsData(Latvian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Latvian)] [SentenceData(Latvian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LithuanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LithuanianDetectionAccuracyReport.cs index 5ef8b3d..1e52d8d 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LithuanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/LithuanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class LithuanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Lithuanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Lithuanian)] [SingleWordData(Lithuanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Lithuanian)] [WordPairsData(Lithuanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Lithuanian)] [SentenceData(Lithuanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MacedonianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MacedonianDetectionAccuracyReport.cs index dd67067..4ada0cd 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MacedonianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MacedonianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class MacedonianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Macedonian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Macedonian)] [SingleWordData(Macedonian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Macedonian)] [WordPairsData(Macedonian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Macedonian)] [SentenceData(Macedonian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MalayDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MalayDetectionAccuracyReport.cs deleted file mode 100644 index 8113965..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MalayDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class MalayDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Malay, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Malay)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Malay)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Malay)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MaoriDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MaoriDetectionAccuracyReport.cs deleted file mode 100644 index be4d7cb..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MaoriDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class MaoriDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Maori, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Maori)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Maori)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Maori)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MarathiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MarathiDetectionAccuracyReport.cs index 56add12..5550e79 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MarathiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MarathiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class MarathiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Marathi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Marathi)] [SingleWordData(Marathi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Marathi)] [WordPairsData(Marathi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Marathi)] [SentenceData(Marathi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MongolianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MongolianDetectionAccuracyReport.cs deleted file mode 100644 index fb40cf2..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/MongolianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class MongolianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Mongolian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Mongolian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Mongolian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Mongolian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/NynorskDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/NynorskDetectionAccuracyReport.cs index 44f8252..b3a8341 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/NynorskDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/NynorskDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class NynorskDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Nynorsk, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Nynorsk)] [SingleWordData(Nynorsk)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Nynorsk)] [WordPairsData(Nynorsk)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Nynorsk)] [SentenceData(Nynorsk)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/OromoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/OromoDetectionAccuracyReport.cs deleted file mode 100644 index d6455ce..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/OromoDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class OromoDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Oromo, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Oromo)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Oromo)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Oromo)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PersianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PersianDetectionAccuracyReport.cs index c62da66..820623f 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PersianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PersianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class PersianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Persian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Persian)] [SingleWordData(Persian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Persian)] [WordPairsData(Persian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Persian)] [SentenceData(Persian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PolishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PolishDetectionAccuracyReport.cs index 81d0f40..4ce63e4 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PolishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PolishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class PolishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Polish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Polish)] [SingleWordData(Polish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Polish)] [WordPairsData(Polish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Polish)] [SentenceData(Polish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PortugueseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PortugueseDetectionAccuracyReport.cs index 23ebf20..d1e291a 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PortugueseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PortugueseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class PortugueseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Portuguese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Portuguese)] [SingleWordData(Portuguese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Portuguese)] [WordPairsData(Portuguese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Portuguese)] [SentenceData(Portuguese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PunjabiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PunjabiDetectionAccuracyReport.cs index 4ed1b28..9eb0fb7 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PunjabiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/PunjabiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class PunjabiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Punjabi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Punjabi)] [SingleWordData(Punjabi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Punjabi)] [WordPairsData(Punjabi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Punjabi)] [SentenceData(Punjabi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RomanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RomanianDetectionAccuracyReport.cs index 53d424f..8e531c2 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RomanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RomanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class RomanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Romanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Romanian)] [SingleWordData(Romanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Romanian)] [WordPairsData(Romanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Romanian)] [SentenceData(Romanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RussianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RussianDetectionAccuracyReport.cs index e03aac6..17e172c 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RussianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/RussianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class RussianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Russian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Russian)] [SingleWordData(Russian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Russian)] [WordPairsData(Russian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Russian)] [SentenceData(Russian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SerbianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SerbianDetectionAccuracyReport.cs deleted file mode 100644 index 4d2d685..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SerbianDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class SerbianDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Serbian, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Serbian)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Serbian)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Serbian)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ShonaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ShonaDetectionAccuracyReport.cs deleted file mode 100644 index 43ec736..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ShonaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class ShonaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Shona, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Shona)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Shona)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Shona)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SinhalaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SinhalaDetectionAccuracyReport.cs deleted file mode 100644 index 4a7181e..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SinhalaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class SinhalaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Sinhala, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Sinhala)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Sinhala)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Sinhala)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SlovakDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SlovakDetectionAccuracyReport.cs index aff816c..76c416e 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SlovakDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SlovakDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SlovakDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Slovak, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Slovak)] [SingleWordData(Slovak)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Slovak)] [WordPairsData(Slovak)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Slovak)] [SentenceData(Slovak)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SloveneDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SloveneDetectionAccuracyReport.cs index 5e35fe8..d67673d 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SloveneDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SloveneDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SloveneDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Slovene, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Slovene)] [SingleWordData(Slovene)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Slovene)] [WordPairsData(Slovene)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Slovene)] [SentenceData(Slovene)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SomaliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SomaliDetectionAccuracyReport.cs index 8283efa..922f81f 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SomaliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SomaliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SomaliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Somali, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Somali)] [SingleWordData(Somali)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Somali)] [WordPairsData(Somali)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Somali)] [SentenceData(Somali)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SothoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SothoDetectionAccuracyReport.cs deleted file mode 100644 index 42acb9c..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SothoDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class SothoDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Sotho, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Sotho)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Sotho)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Sotho)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SpanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SpanishDetectionAccuracyReport.cs index 8cc5c3d..789eb3b 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SpanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SpanishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SpanishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Spanish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Spanish)] [SingleWordData(Spanish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Spanish)] [WordPairsData(Spanish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Spanish)] [SentenceData(Spanish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwahiliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwahiliDetectionAccuracyReport.cs index 0e20f0c..3e63763 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwahiliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwahiliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SwahiliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Swahili, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Swahili)] [SingleWordData(Swahili)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Swahili)] [WordPairsData(Swahili)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Swahili)] [SentenceData(Swahili)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwedishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwedishDetectionAccuracyReport.cs index f243f03..22d9ac5 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwedishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/SwedishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class SwedishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Swedish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Swedish)] [SingleWordData(Swedish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Swedish)] [WordPairsData(Swedish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Swedish)] [SentenceData(Swedish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TagalogDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TagalogDetectionAccuracyReport.cs index d6f0d90..3beaac4 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TagalogDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TagalogDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class TagalogDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Tagalog, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Tagalog)] [SingleWordData(Tagalog)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Tagalog)] [WordPairsData(Tagalog)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Tagalog)] [SentenceData(Tagalog)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TamilDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TamilDetectionAccuracyReport.cs index ec63b86..e194331 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TamilDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TamilDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class TamilDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Tamil, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Tamil)] [SingleWordData(Tamil)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Tamil)] [WordPairsData(Tamil)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Tamil)] [SentenceData(Tamil)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TeluguDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TeluguDetectionAccuracyReport.cs index f40d96e..473d24a 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TeluguDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TeluguDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class TeluguDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Telugu, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Telugu)] [SingleWordData(Telugu)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Telugu)] [WordPairsData(Telugu)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Telugu)] [SentenceData(Telugu)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ThaiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ThaiDetectionAccuracyReport.cs index 75d2b4b..164516f 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ThaiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ThaiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class ThaiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Thai, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Thai)] [SingleWordData(Thai)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Thai)] [WordPairsData(Thai)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Thai)] [SentenceData(Thai)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TigrinyaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TigrinyaDetectionAccuracyReport.cs deleted file mode 100644 index 05ea35c..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TigrinyaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class TigrinyaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Tigrinya, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Tigrinya)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Tigrinya)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Tigrinya)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TsongaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TsongaDetectionAccuracyReport.cs deleted file mode 100644 index 364d12a..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TsongaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class TsongaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Tsonga, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Tsonga)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Tsonga)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Tsonga)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TswanaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TswanaDetectionAccuracyReport.cs deleted file mode 100644 index 8c131dc..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TswanaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class TswanaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Tswana, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Tswana)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Tswana)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Tswana)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TurkishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TurkishDetectionAccuracyReport.cs index 09bf928..5d5d9f0 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TurkishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/TurkishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class TurkishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Turkish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Turkish)] [SingleWordData(Turkish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Turkish)] [WordPairsData(Turkish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Turkish)] [SentenceData(Turkish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UkrainianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UkrainianDetectionAccuracyReport.cs index 33d1eec..3af69de 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UkrainianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UkrainianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class UkrainianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Ukrainian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Ukrainian)] [SingleWordData(Ukrainian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Ukrainian)] [WordPairsData(Ukrainian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Ukrainian)] [SentenceData(Ukrainian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UrduDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UrduDetectionAccuracyReport.cs index 4ad460f..52eec89 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UrduDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/UrduDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class UrduDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Urdu, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Urdu)] [SingleWordData(Urdu)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Urdu)] [WordPairsData(Urdu)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Urdu)] [SentenceData(Urdu)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/VietnameseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/VietnameseDetectionAccuracyReport.cs index 9592226..9ad83c2 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/VietnameseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/VietnameseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.LanguageDetection; public class VietnameseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LanguageDetectionDetectionAccuracyReport(Vietnamese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.LanguageDetection, Vietnamese)] [SingleWordData(Vietnamese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.LanguageDetection, Vietnamese)] [WordPairsData(Vietnamese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.LanguageDetection, Vietnamese)] [SentenceData(Vietnamese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/WelshDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/WelshDetectionAccuracyReport.cs deleted file mode 100644 index 1a65dde..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/WelshDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class WelshDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Welsh, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Welsh)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Welsh)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Welsh)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/XhosaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/XhosaDetectionAccuracyReport.cs deleted file mode 100644 index c8bdde2..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/XhosaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class XhosaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Xhosa, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Xhosa)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Xhosa)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Xhosa)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/YorubaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/YorubaDetectionAccuracyReport.cs deleted file mode 100644 index 40a56ee..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/YorubaDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class YorubaDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Yoruba, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Yoruba)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Yoruba)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Yoruba)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ZuluDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ZuluDetectionAccuracyReport.cs deleted file mode 100644 index 499f171..0000000 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetection/ZuluDetectionAccuracyReport.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Xunit; -using static Lingua.Language; - -namespace Lingua.AccuracyReport.Tests.LanguageDetection; - -public class ZuluDetectionAccuracyReport(LanguageDetectionStatistics statistics) - : LanguageDetectionDetectionAccuracyReport(Zulu, statistics), - IClassFixture> -{ - [Theory(DisplayName = "single word detection")] - [SingleWordData(Zulu)] - public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => - ComputeSingleWordStatistics(singleWord); - - [Theory(DisplayName = "word pair detection")] - [WordPairsData(Zulu)] - public override void WordPairsAreIdentifiedCorrectly(string wordPair) => - ComputeWordPairStatistics(wordPair); - - [Theory(DisplayName = "sentence detection")] - [SentenceData(Zulu)] - public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => - ComputeSentenceStatistics(sentence); -} diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetector.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetector.cs index c43601d..54f210b 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetector.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetector.cs @@ -9,16 +9,16 @@ public Language DetectLanguageOf(string text, Language expectedLanguage) switch (iso6393) { case null: - return Language.Unknown; + return Unknown; // LanguageDetection only supports Norwegian, so convert to two written forms supported by Lingua case "nor": // Default to Bokmal, unless Nynorsk is expected - iso6393 = expectedLanguage == Language.Nynorsk ? "nno" : "nob"; + iso6393 = expectedLanguage == Nynorsk ? "nno" : "nob"; break; } return Enum.TryParse(iso6393, true, out var result) ? LanguageInfo.GetByIsoCode6393(result) - : Language.Unknown; + : Unknown; } } diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetectorFactory.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetectorFactory.cs index ac9e133..4554c75 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetectorFactory.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionLanguageDetectorFactory.cs @@ -8,8 +8,21 @@ public class LanguageDetectionLanguageDetectorFactory : ILanguageDetectorFactory public (ILanguageDetector lowAccuracyDetector, ILanguageDetector highAccuracyDetector) Create() { var detector = new global::LanguageDetection.LanguageDetector(); - detector.AddAllLanguages(); + var isoCodes = SupportedLanguages.GetLanguagesForTest(Implementation) + .Select(GetLanguageDetectionCompatibleIsoCode) + .ToHashSet() + .ToArray(); + + detector.AddLanguages(isoCodes); var languageDetectionLanguageDetector = new LanguageDetectionLanguageDetector(detector); return (languageDetectionLanguageDetector, languageDetectionLanguageDetector); } + + private static string GetLanguageDetectionCompatibleIsoCode(Language language) => + language switch + { + Nynorsk => "nor", + Bokmal => "nor", + _ => language.IsoCode6393().ToString().ToLowerInvariant() + }; } diff --git a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionStatistics.cs b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionStatistics.cs index 1cd5484..ddfa5b9 100644 --- a/tests/Lingua.AccuracyReport.Tests/LanguageDetectionStatistics.cs +++ b/tests/Lingua.AccuracyReport.Tests/LanguageDetectionStatistics.cs @@ -14,6 +14,8 @@ public class LanguageDetectionStatistics : IDisposable // ReSharper disable StaticMemberInGenericType private static readonly ILanguageDetector LowAccuracyDetector; private static readonly ILanguageDetector HighAccuracyDetector; + private static readonly Language[] Languages; + private static readonly Language[] FilteredLanguages; // ReSharper restore StaticMemberInGenericType private static string Implementation => Factory.Implementation.ToString(); @@ -23,6 +25,8 @@ static LanguageDetectionStatistics() { Factory = new TDetectorFactory(); (LowAccuracyDetector, HighAccuracyDetector) = Factory.Create(); + FilteredLanguages = SupportedLanguages.GetLanguagesForTest(Factory.Implementation); + Languages = SupportedLanguages.LanguagesByImplementation[Factory.Implementation]; } private readonly Dictionary _singleWordsStatistics = new(); @@ -39,6 +43,10 @@ static LanguageDetectionStatistics() public void Dispose() { + // only write a report if we actually tested this language + if (!FilteredLanguages.Contains(Language)) + return; + var accuracyReportsDirectoryPath = Path.Combine( SolutionPaths.Root, "accuracy-reports", @@ -51,7 +59,15 @@ public void Dispose() var statisticsReport = StatisticsReport(); Directory.CreateDirectory(accuracyReportsDirectoryPath); - File.WriteAllText(accuracyReportFilePath, statisticsReport); + + try + { + File.WriteAllText(accuracyReportFilePath, statisticsReport); + } + catch (IOException e) + { + throw new Exception($"error writing file for {Implementation} {Language}", e); + } } private static string Anchor(string text, string id) => $"{text}"; @@ -62,6 +78,11 @@ private string StatisticsReport() var language = Language.ToString(); var report = new StringBuilder($"## {Anchor(language, $"{ImplementationLowercase}-{language.ToLowerInvariant()}")}"); + report.AppendLine(); + report.AppendLine(); + report.AppendLine( + $"Configured with {FilteredLanguages.Length} out of {Languages.Length} supported languages"); + var singleWordsAccuracyvalues = MapCountsToAccuracies(_singleWordsStatistics); var wordPairsAccuracyvalues = MapCountsToAccuracies(_wordPairsStatistics); var sentencesAccuracyvalues = MapCountsToAccuracies(_sentencesStatistics); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/AfrikaansDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/AfrikaansDetectionAccuracyReport.cs index e06da14..996c89b 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/AfrikaansDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/AfrikaansDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class AfrikaansDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Afrikaans, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Afrikaans)] [SingleWordData(Afrikaans)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Afrikaans)] [WordPairsData(Afrikaans)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Afrikaans)] [SentenceData(Afrikaans)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/AlbanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/AlbanianDetectionAccuracyReport.cs index ca12018..183dd56 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/AlbanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/AlbanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class AlbanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Albanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Albanian)] [SingleWordData(Albanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Albanian)] [WordPairsData(Albanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Albanian)] [SentenceData(Albanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/AmharicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/AmharicDetectionAccuracyReport.cs index 947255f..df59bd3 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/AmharicDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/AmharicDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class AmharicDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Amharic, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Amharic)] [SingleWordData(Amharic)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Amharic)] [WordPairsData(Amharic)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Amharic)] [SentenceData(Amharic)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ArabicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ArabicDetectionAccuracyReport.cs index cbb0674..26045a1 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ArabicDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ArabicDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ArabicDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Arabic, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Arabic)] [SingleWordData(Arabic)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Arabic)] [WordPairsData(Arabic)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Arabic)] [SentenceData(Arabic)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ArmenianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ArmenianDetectionAccuracyReport.cs index ab06219..02201fd 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ArmenianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ArmenianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ArmenianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Armenian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Armenian)] [SingleWordData(Armenian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Armenian)] [WordPairsData(Armenian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Armenian)] [SentenceData(Armenian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/AzerbaijaniDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/AzerbaijaniDetectionAccuracyReport.cs index 28bef4d..365e1f0 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/AzerbaijaniDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/AzerbaijaniDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class AzerbaijaniDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Azerbaijani, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Azerbaijani)] [SingleWordData(Azerbaijani)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Azerbaijani)] [WordPairsData(Azerbaijani)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Azerbaijani)] [SentenceData(Azerbaijani)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BasqueDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BasqueDetectionAccuracyReport.cs index 79d8554..adf88ee 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BasqueDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BasqueDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BasqueDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Basque, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Basque)] [SingleWordData(Basque)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Basque)] [WordPairsData(Basque)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Basque)] [SentenceData(Basque)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BelarusianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BelarusianDetectionAccuracyReport.cs index 23b94d2..4519bc7 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BelarusianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BelarusianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BelarusianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Belarusian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Belarusian)] [SingleWordData(Belarusian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Belarusian)] [WordPairsData(Belarusian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Belarusian)] [SentenceData(Belarusian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BengaliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BengaliDetectionAccuracyReport.cs index a4768e9..3c1ed01 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BengaliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BengaliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BengaliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Bengali, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Bengali)] [SingleWordData(Bengali)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Bengali)] [WordPairsData(Bengali)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Bengali)] [SentenceData(Bengali)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BokmalDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BokmalDetectionAccuracyReport.cs index 31b3c03..beb7d3f 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BokmalDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BokmalDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BokmalDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Bokmal, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Bokmal)] [SingleWordData(Bokmal)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Bokmal)] [WordPairsData(Bokmal)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Bokmal)] [SentenceData(Bokmal)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BosnianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BosnianDetectionAccuracyReport.cs index 1379af9..c243d4d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BosnianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BosnianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BosnianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Bosnian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Bosnian)] [SingleWordData(Bosnian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Bosnian)] [WordPairsData(Bosnian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Bosnian)] [SentenceData(Bosnian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/BulgarianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/BulgarianDetectionAccuracyReport.cs index c66851d..90d4a56 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/BulgarianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/BulgarianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class BulgarianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Bulgarian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Bulgarian)] [SingleWordData(Bulgarian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Bulgarian)] [WordPairsData(Bulgarian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Bulgarian)] [SentenceData(Bulgarian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/CatalanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/CatalanDetectionAccuracyReport.cs index ab41116..f26b1bc 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/CatalanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/CatalanDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class CatalanDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Catalan, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Catalan)] [SingleWordData(Catalan)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Catalan)] [WordPairsData(Catalan)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Catalan)] [SentenceData(Catalan)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ChineseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ChineseDetectionAccuracyReport.cs index 57b8b2a..1104467 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ChineseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ChineseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ChineseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Chinese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Chinese)] [SingleWordData(Chinese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Chinese)] [WordPairsData(Chinese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Chinese)] [SentenceData(Chinese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/CroatianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/CroatianDetectionAccuracyReport.cs index 83f09f3..d94b9af 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/CroatianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/CroatianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class CroatianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Croatian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Croatian)] [SingleWordData(Croatian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Croatian)] [WordPairsData(Croatian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Croatian)] [SentenceData(Croatian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/CzechDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/CzechDetectionAccuracyReport.cs index 47e1141..14d5f68 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/CzechDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/CzechDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class CzechDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Czech, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Czech)] [SingleWordData(Czech)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Czech)] [WordPairsData(Czech)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Czech)] [SentenceData(Czech)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/DanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/DanishDetectionAccuracyReport.cs index bb58e79..cd76ab6 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/DanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/DanishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class DanishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Danish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Danish)] [SingleWordData(Danish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Danish)] [WordPairsData(Danish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Danish)] [SentenceData(Danish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/DutchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/DutchDetectionAccuracyReport.cs index 3b4a20d..06591ae 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/DutchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/DutchDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class DutchDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Dutch, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Dutch)] [SingleWordData(Dutch)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Dutch)] [WordPairsData(Dutch)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Dutch)] [SentenceData(Dutch)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/EnglishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/EnglishDetectionAccuracyReport.cs index 59eb43c..fbeb55c 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/EnglishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/EnglishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class EnglishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(English, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, English)] [SingleWordData(English)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, English)] [WordPairsData(English)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, English)] [SentenceData(English)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/EsperantoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/EsperantoDetectionAccuracyReport.cs index 8724345..6095fa1 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/EsperantoDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/EsperantoDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class EsperantoDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Esperanto, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Esperanto)] [SingleWordData(Esperanto)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Esperanto)] [WordPairsData(Esperanto)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Esperanto)] [SentenceData(Esperanto)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/EstonianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/EstonianDetectionAccuracyReport.cs index 538e0f0..f454401 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/EstonianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/EstonianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class EstonianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Estonian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Estonian)] [SingleWordData(Estonian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Estonian)] [WordPairsData(Estonian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Estonian)] [SentenceData(Estonian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/FinnishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/FinnishDetectionAccuracyReport.cs index 7bc4c80..4eefd0f 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/FinnishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/FinnishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class FinnishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Finnish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Finnish)] [SingleWordData(Finnish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Finnish)] [WordPairsData(Finnish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Finnish)] [SentenceData(Finnish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/FrenchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/FrenchDetectionAccuracyReport.cs index 43bdb65..0ba7b67 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/FrenchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/FrenchDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class FrenchDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(French, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, French)] [SingleWordData(French)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, French)] [WordPairsData(French)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, French)] [SentenceData(French)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/GandaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/GandaDetectionAccuracyReport.cs index 7177a5d..6e40911 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/GandaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/GandaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class GandaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Ganda, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Ganda)] [SingleWordData(Ganda)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Ganda)] [WordPairsData(Ganda)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Ganda)] [SentenceData(Ganda)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/GeorgianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/GeorgianDetectionAccuracyReport.cs index 65ce141..7495bd1 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/GeorgianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/GeorgianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class GeorgianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Georgian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Georgian)] [SingleWordData(Georgian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Georgian)] [WordPairsData(Georgian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Georgian)] [SentenceData(Georgian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/GermanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/GermanDetectionAccuracyReport.cs index 9691ed4..ffaaf4b 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/GermanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/GermanDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class GermanDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(German, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, German)] [SingleWordData(German)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, German)] [WordPairsData(German)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, German)] [SentenceData(German)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/GreekDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/GreekDetectionAccuracyReport.cs index b7aa832..80e2009 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/GreekDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/GreekDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class GreekDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Greek, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Greek)] [SingleWordData(Greek)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Greek)] [WordPairsData(Greek)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Greek)] [SentenceData(Greek)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/GujaratiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/GujaratiDetectionAccuracyReport.cs index 7709050..6aa5f05 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/GujaratiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/GujaratiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class GujaratiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Gujarati, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Gujarati)] [SingleWordData(Gujarati)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Gujarati)] [WordPairsData(Gujarati)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Gujarati)] [SentenceData(Gujarati)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/HebrewDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/HebrewDetectionAccuracyReport.cs index b046f37..28caa05 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/HebrewDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/HebrewDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class HebrewDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Hebrew, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Hebrew)] [SingleWordData(Hebrew)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Hebrew)] [WordPairsData(Hebrew)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Hebrew)] [SentenceData(Hebrew)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/HindiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/HindiDetectionAccuracyReport.cs index 8e0372d..7a207f2 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/HindiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/HindiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class HindiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Hindi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Hindi)] [SingleWordData(Hindi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Hindi)] [WordPairsData(Hindi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Hindi)] [SentenceData(Hindi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/HungarianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/HungarianDetectionAccuracyReport.cs index 25863ea..f4d5809 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/HungarianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/HungarianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class HungarianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Hungarian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Hungarian)] [SingleWordData(Hungarian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Hungarian)] [WordPairsData(Hungarian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Hungarian)] [SentenceData(Hungarian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/IcelandicDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/IcelandicDetectionAccuracyReport.cs index 6043a55..ff7c848 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/IcelandicDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/IcelandicDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class IcelandicDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Icelandic, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Icelandic)] [SingleWordData(Icelandic)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Icelandic)] [WordPairsData(Icelandic)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Icelandic)] [SentenceData(Icelandic)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/IndonesianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/IndonesianDetectionAccuracyReport.cs index 6e7d674..76cada0 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/IndonesianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/IndonesianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class IndonesianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Indonesian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Indonesian)] [SingleWordData(Indonesian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Indonesian)] [WordPairsData(Indonesian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Indonesian)] [SentenceData(Indonesian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/IrishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/IrishDetectionAccuracyReport.cs index 59a817d..12edeca 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/IrishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/IrishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class IrishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Irish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Irish)] [SingleWordData(Irish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Irish)] [WordPairsData(Irish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Irish)] [SentenceData(Irish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ItalianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ItalianDetectionAccuracyReport.cs index 75ecdb9..cbf7e9b 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ItalianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ItalianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ItalianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Italian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Italian)] [SingleWordData(Italian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Italian)] [WordPairsData(Italian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Italian)] [SentenceData(Italian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/JapaneseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/JapaneseDetectionAccuracyReport.cs index 50df678..82ad678 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/JapaneseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/JapaneseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class JapaneseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Japanese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Japanese)] [SingleWordData(Japanese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Japanese)] [WordPairsData(Japanese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Japanese)] [SentenceData(Japanese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/KazakhDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/KazakhDetectionAccuracyReport.cs index fe37e72..e0e032e 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/KazakhDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/KazakhDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class KazakhDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Kazakh, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Kazakh)] [SingleWordData(Kazakh)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Kazakh)] [WordPairsData(Kazakh)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Kazakh)] [SentenceData(Kazakh)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/KoreanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/KoreanDetectionAccuracyReport.cs index 83b412d..7206c36 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/KoreanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/KoreanDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class KoreanDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Korean, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Korean)] [SingleWordData(Korean)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Korean)] [WordPairsData(Korean)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Korean)] [SentenceData(Korean)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/LatinDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/LatinDetectionAccuracyReport.cs index 2a1ca01..9baa05d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/LatinDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/LatinDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class LatinDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Latin, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Latin)] [SingleWordData(Latin)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Latin)] [WordPairsData(Latin)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Latin)] [SentenceData(Latin)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/LatvianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/LatvianDetectionAccuracyReport.cs index f52a302..63e0c7f 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/LatvianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/LatvianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class LatvianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Latvian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Latvian)] [SingleWordData(Latvian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Latvian)] [WordPairsData(Latvian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Latvian)] [SentenceData(Latvian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/LithuanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/LithuanianDetectionAccuracyReport.cs index 8d4cea8..129d560 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/LithuanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/LithuanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class LithuanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Lithuanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Lithuanian)] [SingleWordData(Lithuanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Lithuanian)] [WordPairsData(Lithuanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Lithuanian)] [SentenceData(Lithuanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/MacedonianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/MacedonianDetectionAccuracyReport.cs index fcb79d5..d47c9c2 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/MacedonianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/MacedonianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class MacedonianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Macedonian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Macedonian)] [SingleWordData(Macedonian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Macedonian)] [WordPairsData(Macedonian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Macedonian)] [SentenceData(Macedonian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/MalayDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/MalayDetectionAccuracyReport.cs index eba0131..ec00a61 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/MalayDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/MalayDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class MalayDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Malay, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Malay)] [SingleWordData(Malay)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Malay)] [WordPairsData(Malay)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Malay)] [SentenceData(Malay)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/MaoriDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/MaoriDetectionAccuracyReport.cs index a95847f..f848b1f 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/MaoriDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/MaoriDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class MaoriDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Maori, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Maori)] [SingleWordData(Maori)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Maori)] [WordPairsData(Maori)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Maori)] [SentenceData(Maori)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/MarathiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/MarathiDetectionAccuracyReport.cs index 8e206b0..17d1d38 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/MarathiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/MarathiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class MarathiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Marathi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Marathi)] [SingleWordData(Marathi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Marathi)] [WordPairsData(Marathi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Marathi)] [SentenceData(Marathi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/MongolianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/MongolianDetectionAccuracyReport.cs index d539b97..f8a7a5c 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/MongolianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/MongolianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class MongolianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Mongolian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Mongolian)] [SingleWordData(Mongolian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Mongolian)] [WordPairsData(Mongolian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Mongolian)] [SentenceData(Mongolian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/NynorskDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/NynorskDetectionAccuracyReport.cs index f2d8074..d361fd1 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/NynorskDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/NynorskDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class NynorskDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Nynorsk, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Nynorsk)] [SingleWordData(Nynorsk)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Nynorsk)] [WordPairsData(Nynorsk)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Nynorsk)] [SentenceData(Nynorsk)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/OromoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/OromoDetectionAccuracyReport.cs index f6a590f..4fba3bc 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/OromoDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/OromoDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class OromoDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Oromo, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Oromo)] [SingleWordData(Oromo)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Oromo)] [WordPairsData(Oromo)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Oromo)] [SentenceData(Oromo)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/PersianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/PersianDetectionAccuracyReport.cs index 25be9c4..0911c32 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/PersianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/PersianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class PersianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Persian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Persian)] [SingleWordData(Persian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Persian)] [WordPairsData(Persian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Persian)] [SentenceData(Persian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/PolishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/PolishDetectionAccuracyReport.cs index 8ea5278..89194ac 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/PolishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/PolishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class PolishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Polish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Polish)] [SingleWordData(Polish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Polish)] [WordPairsData(Polish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Polish)] [SentenceData(Polish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/PortugueseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/PortugueseDetectionAccuracyReport.cs index ee5e0c0..bba16ee 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/PortugueseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/PortugueseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class PortugueseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Portuguese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Portuguese)] [SingleWordData(Portuguese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Portuguese)] [WordPairsData(Portuguese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Portuguese)] [SentenceData(Portuguese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/PunjabiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/PunjabiDetectionAccuracyReport.cs index fad61e6..2bae12b 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/PunjabiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/PunjabiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class PunjabiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Punjabi, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Punjabi)] [SingleWordData(Punjabi)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Punjabi)] [WordPairsData(Punjabi)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Punjabi)] [SentenceData(Punjabi)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/RomanianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/RomanianDetectionAccuracyReport.cs index 5ff02c7..fcdd444 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/RomanianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/RomanianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class RomanianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Romanian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Romanian)] [SingleWordData(Romanian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Romanian)] [WordPairsData(Romanian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Romanian)] [SentenceData(Romanian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/RussianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/RussianDetectionAccuracyReport.cs index 5822b6e..b672b45 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/RussianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/RussianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class RussianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Russian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Russian)] [SingleWordData(Russian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Russian)] [WordPairsData(Russian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Russian)] [SentenceData(Russian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SerbianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SerbianDetectionAccuracyReport.cs index 9e7f5c6..1f5cb4d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SerbianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SerbianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SerbianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Serbian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Serbian)] [SingleWordData(Serbian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Serbian)] [WordPairsData(Serbian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Serbian)] [SentenceData(Serbian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ShonaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ShonaDetectionAccuracyReport.cs index bd947bc..85a226e 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ShonaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ShonaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ShonaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Shona, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Shona)] [SingleWordData(Shona)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Shona)] [WordPairsData(Shona)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Shona)] [SentenceData(Shona)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SinhalaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SinhalaDetectionAccuracyReport.cs index f6093ea..95a0639 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SinhalaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SinhalaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SinhalaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Sinhala, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Sinhala)] [SingleWordData(Sinhala)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Sinhala)] [WordPairsData(Sinhala)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Sinhala)] [SentenceData(Sinhala)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SlovakDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SlovakDetectionAccuracyReport.cs index 8e18aeb..3681ad7 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SlovakDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SlovakDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SlovakDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Slovak, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Slovak)] [SingleWordData(Slovak)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Slovak)] [WordPairsData(Slovak)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Slovak)] [SentenceData(Slovak)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SloveneDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SloveneDetectionAccuracyReport.cs index 78413c7..412c53d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SloveneDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SloveneDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SloveneDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Slovene, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Slovene)] [SingleWordData(Slovene)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Slovene)] [WordPairsData(Slovene)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Slovene)] [SentenceData(Slovene)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SomaliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SomaliDetectionAccuracyReport.cs index e2ce2cf..2665cd2 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SomaliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SomaliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SomaliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Somali, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Somali)] [SingleWordData(Somali)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Somali)] [WordPairsData(Somali)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Somali)] [SentenceData(Somali)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SothoDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SothoDetectionAccuracyReport.cs index f3cbd96..9310011 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SothoDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SothoDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SothoDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Sotho, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Sotho)] [SingleWordData(Sotho)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Sotho)] [WordPairsData(Sotho)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Sotho)] [SentenceData(Sotho)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SpanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SpanishDetectionAccuracyReport.cs index b845abb..5692e41 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SpanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SpanishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SpanishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Spanish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Spanish)] [SingleWordData(Spanish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Spanish)] [WordPairsData(Spanish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Spanish)] [SentenceData(Spanish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SwahiliDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SwahiliDetectionAccuracyReport.cs index c11ac94..b0ba017 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SwahiliDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SwahiliDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SwahiliDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Swahili, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Swahili)] [SingleWordData(Swahili)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Swahili)] [WordPairsData(Swahili)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Swahili)] [SentenceData(Swahili)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/SwedishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/SwedishDetectionAccuracyReport.cs index dafb75d..af92bc6 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/SwedishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/SwedishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class SwedishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Swedish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Swedish)] [SingleWordData(Swedish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Swedish)] [WordPairsData(Swedish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Swedish)] [SentenceData(Swedish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TagalogDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TagalogDetectionAccuracyReport.cs index e460588..935ca35 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TagalogDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TagalogDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TagalogDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Tagalog, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Tagalog)] [SingleWordData(Tagalog)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Tagalog)] [WordPairsData(Tagalog)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Tagalog)] [SentenceData(Tagalog)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TamilDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TamilDetectionAccuracyReport.cs index 5b2536b..ea6cd4c 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TamilDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TamilDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TamilDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Tamil, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Tamil)] [SingleWordData(Tamil)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Tamil)] [WordPairsData(Tamil)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Tamil)] [SentenceData(Tamil)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TeluguDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TeluguDetectionAccuracyReport.cs index 5e81d80..4e87de7 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TeluguDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TeluguDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TeluguDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Telugu, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Telugu)] [SingleWordData(Telugu)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Telugu)] [WordPairsData(Telugu)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Telugu)] [SentenceData(Telugu)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ThaiDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ThaiDetectionAccuracyReport.cs index f20f3f1..c3c4b82 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ThaiDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ThaiDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ThaiDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Thai, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Thai)] [SingleWordData(Thai)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Thai)] [WordPairsData(Thai)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Thai)] [SentenceData(Thai)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TigrinyaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TigrinyaDetectionAccuracyReport.cs index b02fe8d..319a5ba 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TigrinyaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TigrinyaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TigrinyaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Tigrinya, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Tigrinya)] [SingleWordData(Tigrinya)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Tigrinya)] [WordPairsData(Tigrinya)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Tigrinya)] [SentenceData(Tigrinya)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TsongaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TsongaDetectionAccuracyReport.cs index be84609..35eae5a 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TsongaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TsongaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TsongaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Tsonga, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Tsonga)] [SingleWordData(Tsonga)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Tsonga)] [WordPairsData(Tsonga)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Tsonga)] [SentenceData(Tsonga)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TswanaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TswanaDetectionAccuracyReport.cs index ae5bdfe..ee97e6a 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TswanaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TswanaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TswanaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Tswana, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Tswana)] [SingleWordData(Tswana)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Tswana)] [WordPairsData(Tswana)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Tswana)] [SentenceData(Tswana)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/TurkishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/TurkishDetectionAccuracyReport.cs index 42fe6ba..60c1fcc 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/TurkishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/TurkishDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class TurkishDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Turkish, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Turkish)] [SingleWordData(Turkish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Turkish)] [WordPairsData(Turkish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Turkish)] [SentenceData(Turkish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/UkrainianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/UkrainianDetectionAccuracyReport.cs index a3e0183..9cdae3d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/UkrainianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/UkrainianDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class UkrainianDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Ukrainian, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Ukrainian)] [SingleWordData(Ukrainian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Ukrainian)] [WordPairsData(Ukrainian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Ukrainian)] [SentenceData(Ukrainian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/UrduDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/UrduDetectionAccuracyReport.cs index 9784ea6..389e32d 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/UrduDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/UrduDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class UrduDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Urdu, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Urdu)] [SingleWordData(Urdu)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Urdu)] [WordPairsData(Urdu)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Urdu)] [SentenceData(Urdu)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/VietnameseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/VietnameseDetectionAccuracyReport.cs index fa7c60c..98fd00a 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/VietnameseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/VietnameseDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class VietnameseDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Vietnamese, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Vietnamese)] [SingleWordData(Vietnamese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Vietnamese)] [WordPairsData(Vietnamese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Vietnamese)] [SentenceData(Vietnamese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/WelshDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/WelshDetectionAccuracyReport.cs index 1d19c9b..a8c22fc 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/WelshDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/WelshDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class WelshDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Welsh, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Welsh)] [SingleWordData(Welsh)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Welsh)] [WordPairsData(Welsh)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Welsh)] [SentenceData(Welsh)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/XhosaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/XhosaDetectionAccuracyReport.cs index cb505fc..ced3ee0 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/XhosaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/XhosaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class XhosaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Xhosa, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Xhosa)] [SingleWordData(Xhosa)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Xhosa)] [WordPairsData(Xhosa)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Xhosa)] [SentenceData(Xhosa)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/YorubaDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/YorubaDetectionAccuracyReport.cs index d65e90c..cea5fe0 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/YorubaDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/YorubaDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class YorubaDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Yoruba, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Yoruba)] [SingleWordData(Yoruba)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Yoruba)] [WordPairsData(Yoruba)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Yoruba)] [SentenceData(Yoruba)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/Lingua/ZuluDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/Lingua/ZuluDetectionAccuracyReport.cs index b397a49..f2fcd32 100644 --- a/tests/Lingua.AccuracyReport.Tests/Lingua/ZuluDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/Lingua/ZuluDetectionAccuracyReport.cs @@ -1,23 +1,20 @@ -using Xunit; -using static Lingua.Language; - namespace Lingua.AccuracyReport.Tests.Lingua; public class ZuluDetectionAccuracyReport(LanguageDetectionStatistics statistics) : LinguaDetectionAccuracyReport(Zulu, statistics), IClassFixture> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.Lingua, Zulu)] [SingleWordData(Zulu)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.Lingua, Zulu)] [WordPairsData(Zulu)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.Lingua, Zulu)] [SentenceData(Zulu)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/LinguaLanguageDetectorFactory.cs b/tests/Lingua.AccuracyReport.Tests/LinguaLanguageDetectorFactory.cs index 2210702..5ad94fc 100644 --- a/tests/Lingua.AccuracyReport.Tests/LinguaLanguageDetectorFactory.cs +++ b/tests/Lingua.AccuracyReport.Tests/LinguaLanguageDetectorFactory.cs @@ -1,3 +1,5 @@ +using static Lingua.AccuracyReport.Tests.SupportedLanguages; + namespace Lingua.AccuracyReport.Tests; public class LinguaLanguageDetectorFactory : ILanguageDetectorFactory @@ -7,12 +9,14 @@ public class LinguaLanguageDetectorFactory : ILanguageDetectorFactory public (ILanguageDetector lowAccuracyDetector, ILanguageDetector highAccuracyDetector) Create() { - var languageDetectorWithLowAccuracy = new LinguaLanguageDetector(LanguageDetectorBuilder.FromAllLanguages() - .WithLowAccuracyMode() - .Build()); + var languageDetectorWithLowAccuracy = new LinguaLanguageDetector( + LanguageDetectorBuilder.FromLanguages(GetLanguagesForTest(Implementation)) + .WithLowAccuracyMode() + .Build()); - var languageDetectorWithHighAccuracy = new LinguaLanguageDetector(LanguageDetectorBuilder.FromAllLanguages() - .Build()); + var languageDetectorWithHighAccuracy = new LinguaLanguageDetector( + LanguageDetectorBuilder.FromLanguages(GetLanguagesForTest(Implementation)) + .Build()); return (languageDetectorWithLowAccuracy, languageDetectorWithHighAccuracy); } diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/BokmalDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/BokmalDetectionAccuracyReport.cs index f664d48..d850147 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/BokmalDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/BokmalDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class BokmalDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Bokmal)] [SingleWordData(Bokmal)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Bokmal)] [WordPairsData(Bokmal)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Bokmal)] [SentenceData(Bokmal)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/ChineseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/ChineseDetectionAccuracyReport.cs index f2194aa..7d4c7fd 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/ChineseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/ChineseDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class ChineseDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Chinese)] [SingleWordData(Chinese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Chinese)] [WordPairsData(Chinese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Chinese)] [SentenceData(Chinese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/DanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/DanishDetectionAccuracyReport.cs index 6f17880..70eca77 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/DanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/DanishDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class DanishDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Danish)] [SingleWordData(Danish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Danish)] [WordPairsData(Danish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Danish)] [SentenceData(Danish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/DutchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/DutchDetectionAccuracyReport.cs index 19b1b20..c98ac81 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/DutchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/DutchDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class DutchDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Dutch)] [SingleWordData(Dutch)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Dutch)] [WordPairsData(Dutch)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Dutch)] [SentenceData(Dutch)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/EnglishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/EnglishDetectionAccuracyReport.cs index 7446dbc..7024f68 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/EnglishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/EnglishDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class EnglishDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, English)] [SingleWordData(English)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, English)] [WordPairsData(English)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, English)] [SentenceData(English)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/FrenchDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/FrenchDetectionAccuracyReport.cs index 1e7f7e3..58d233d 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/FrenchDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/FrenchDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class FrenchDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, French)] [SingleWordData(French)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, French)] [WordPairsData(French)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, French)] [SentenceData(French)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/GermanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/GermanDetectionAccuracyReport.cs index 887b14a..34fd4d0 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/GermanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/GermanDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class GermanDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, German)] [SingleWordData(German)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, German)] [WordPairsData(German)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, German)] [SentenceData(German)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/ItalianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/ItalianDetectionAccuracyReport.cs index c4ceae4..0436478 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/ItalianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/ItalianDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class ItalianDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Italian)] [SingleWordData(Italian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Italian)] [WordPairsData(Italian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Italian)] [SentenceData(Italian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/JapaneseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/JapaneseDetectionAccuracyReport.cs index b584d1f..4911ae8 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/JapaneseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/JapaneseDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class JapaneseDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Japanese)] [SingleWordData(Japanese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Japanese)] [WordPairsData(Japanese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Japanese)] [SentenceData(Japanese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/KoreanDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/KoreanDetectionAccuracyReport.cs index a989286..c6e5442 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/KoreanDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/KoreanDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class KoreanDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Korean)] [SingleWordData(Korean)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Korean)] [WordPairsData(Korean)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Korean)] [SentenceData(Korean)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/NynorskDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/NynorskDetectionAccuracyReport.cs index f18dda5..eb8d0e4 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/NynorskDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/NynorskDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class NynorskDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Nynorsk)] [SingleWordData(Nynorsk)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Nynorsk)] [WordPairsData(Nynorsk)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Nynorsk)] [SentenceData(Nynorsk)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/PortugueseDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/PortugueseDetectionAccuracyReport.cs index 256df2c..46389c3 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/PortugueseDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/PortugueseDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class PortugueseDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Portuguese)] [SingleWordData(Portuguese)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Portuguese)] [WordPairsData(Portuguese)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Portuguese)] [SentenceData(Portuguese)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/RussianDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/RussianDetectionAccuracyReport.cs index b1ef228..a9a8c4a 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/RussianDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/RussianDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class RussianDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Russian)] [SingleWordData(Russian)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Russian)] [WordPairsData(Russian)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Russian)] [SentenceData(Russian)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/SpanishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/SpanishDetectionAccuracyReport.cs index b8b06b5..2f1bdeb 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/SpanishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/SpanishDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class SpanishDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Spanish)] [SingleWordData(Spanish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Spanish)] [WordPairsData(Spanish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Spanish)] [SentenceData(Spanish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCat/SwedishDetectionAccuracyReport.cs b/tests/Lingua.AccuracyReport.Tests/NTextCat/SwedishDetectionAccuracyReport.cs index 44ddf84..8519268 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCat/SwedishDetectionAccuracyReport.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCat/SwedishDetectionAccuracyReport.cs @@ -1,6 +1,4 @@ using Lingua.AccuracyReport.Tests.Lingua; -using Xunit; -using static Lingua.Language; namespace Lingua.AccuracyReport.Tests.NTextCat; @@ -8,17 +6,17 @@ public class SwedishDetectionAccuracyReport(LanguageDetectionStatistics> { - [Theory(DisplayName = "single word detection")] + [SingleWordReportTheory(Implementation.NTextCat, Swedish)] [SingleWordData(Swedish)] public override void SingleWordsAreIdentifiedCorrectly(string singleWord) => ComputeSingleWordStatistics(singleWord); - [Theory(DisplayName = "word pair detection")] + [WordPairsReportTheory(Implementation.NTextCat, Swedish)] [WordPairsData(Swedish)] public override void WordPairsAreIdentifiedCorrectly(string wordPair) => ComputeWordPairStatistics(wordPair); - [Theory(DisplayName = "sentence detection")] + [SentenceReportTheory(Implementation.NTextCat, Swedish)] [SentenceData(Swedish)] public override void EntireSentencesAreIdentifiedCorrectly(string sentence) => ComputeSentenceStatistics(sentence); diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetector.cs b/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetector.cs index 188413a..1a6d665 100644 --- a/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetector.cs +++ b/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetector.cs @@ -9,33 +9,18 @@ public Language DetectLanguageOf(string text, Language expectedLanguage) var values = rankedLanguageIdentifier.Identify(text).ToList(); if (values.Count == 0) - return Language.Unknown; + return Unknown; // NTextCat only supports Norwegian, so convert to two written forms supported by Lingua var iso6393 = values[0].Item1.Iso639_3; if (iso6393 == "nor") { // Default to Bokmal, unless Nynorsk is expected - iso6393 = expectedLanguage == Language.Nynorsk ? "nno" : "nob"; + iso6393 = expectedLanguage == Nynorsk ? "nno" : "nob"; } return Enum.TryParse(iso6393, true, out var result) ? LanguageInfo.GetByIsoCode6393(result) - : Language.Unknown; + : Unknown; } } - -public class NTextCatLanguageDetectorFactory : ILanguageDetectorFactory -{ - public Implementation Implementation => Implementation.NTextCat; - public bool SupportsLowAccuracyMode => false; - - public (ILanguageDetector lowAccuracyDetector, ILanguageDetector highAccuracyDetector) Create() - { - var factory = new RankedLanguageIdentifierFactory(); - var detector = new NTextCatLanguageDetector(factory.Load(Path.Combine("NTextCat", "Core14.profile.xml"))); - - return (detector, detector); - } -} - diff --git a/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetectorFactory.cs b/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetectorFactory.cs new file mode 100644 index 0000000..905ad27 --- /dev/null +++ b/tests/Lingua.AccuracyReport.Tests/NTextCatLanguageDetectorFactory.cs @@ -0,0 +1,30 @@ +using NTextCat; + +namespace Lingua.AccuracyReport.Tests; + +public class NTextCatLanguageDetectorFactory : ILanguageDetectorFactory +{ + public Implementation Implementation => Implementation.NTextCat; + public bool SupportsLowAccuracyMode => false; + + public (ILanguageDetector lowAccuracyDetector, ILanguageDetector highAccuracyDetector) Create() + { + var factory = new RankedLanguageIdentifierFactory(); + var isoCodes = SupportedLanguages.GetLanguagesForTest(Implementation) + .Select(GetNTextCatCompatibleIsoCode) + .ToHashSet(); + var rankedLanguageIdentifier = factory.Load(Path.Combine("NTextCat", "Core14.profile.xml"), + model => isoCodes.Contains(model.Language.Iso639_3)); + var detector = new NTextCatLanguageDetector(rankedLanguageIdentifier); + + return (detector, detector); + } + + private static string GetNTextCatCompatibleIsoCode(Language language) => + language switch + { + Nynorsk => "nor", + Bokmal => "nor", + _ => language.IsoCode6393().ToString().ToLowerInvariant() + }; +} diff --git a/tests/Lingua.AccuracyReport.Tests/ReportTheory.cs b/tests/Lingua.AccuracyReport.Tests/ReportTheory.cs new file mode 100644 index 0000000..41949d7 --- /dev/null +++ b/tests/Lingua.AccuracyReport.Tests/ReportTheory.cs @@ -0,0 +1,34 @@ +// ReSharper disable VirtualMemberCallInConstructor +namespace Lingua.AccuracyReport.Tests; + +[AttributeUsage(AttributeTargets.Method)] +public class ReportTheoryAttribute : TheoryAttribute +{ + protected ReportTheoryAttribute(Implementation implementation, Language language) + { + if (!SupportedLanguages.GetLanguagesForTest(implementation).Contains(language)) + Skip = $"Filtered languages does not contain {language}"; + } +} + +public class WordPairsReportTheoryAttribute : ReportTheoryAttribute +{ + public WordPairsReportTheoryAttribute(Implementation implementation, Language language) + : base(implementation, language) => + DisplayName = $"{implementation} {language} word pair detection"; +} + +public class SingleWordReportTheoryAttribute : ReportTheoryAttribute +{ + public SingleWordReportTheoryAttribute(Implementation implementation, Language language) + : base(implementation, language) => + DisplayName = $"{implementation} {language} single word detection"; +} + +public class SentenceReportTheoryAttribute : ReportTheoryAttribute +{ + public SentenceReportTheoryAttribute(Implementation implementation, Language language) + : base(implementation, language) => + DisplayName = $"{implementation} {language} sentence detection"; +} + diff --git a/tests/Lingua.AccuracyReport.Tests/SupportedLanguages.cs b/tests/Lingua.AccuracyReport.Tests/SupportedLanguages.cs new file mode 100644 index 0000000..9239ef3 --- /dev/null +++ b/tests/Lingua.AccuracyReport.Tests/SupportedLanguages.cs @@ -0,0 +1,105 @@ +namespace Lingua.AccuracyReport.Tests; + +public static class SupportedLanguages +{ + static SupportedLanguages() + { + var languageIsoCodesSupportedByLanguageDetection = typeof(global::LanguageDetection.LanguageDetector).Assembly + .GetManifestResourceNames() + .Select(r => r[(r.LastIndexOf('.') + 1)..]) + .ToList(); + + var languagesSupportedByLanguageDetection = new HashSet(); + foreach (var isoCode in languageIsoCodesSupportedByLanguageDetection) + { + if (Enum.TryParse(isoCode, true, out var result)) + languagesSupportedByLanguageDetection.Add(LanguageInfo.GetByIsoCode6393(result)); + else if (isoCode == "nor") + { + languagesSupportedByLanguageDetection.Add(Nynorsk); + languagesSupportedByLanguageDetection.Add(Bokmal); + } + else + { + var foo = isoCode; + } + } + + var languageDetection = languagesSupportedByLanguageDetection.ToArray(); + + Language[] ntextCat = + [ + Danish, + German, + English, + French, + Italian, + Japanese, + Korean, + Dutch, + Portuguese, + Russian, + Spanish, + Swedish, + Chinese, + // substitutes for Norwegian (nor) + Bokmal, + Nynorsk, + ]; + + LanguagesByImplementation = new Dictionary + { + [Implementation.Lingua] = LanguageInfo.All().ToArray(), + [Implementation.LanguageDetection] = languageDetection, + [Implementation.NTextCat] = ntextCat + }; + } + + /// + /// Languages supported by each of the given implementations + /// + public static readonly IReadOnlyDictionary LanguagesByImplementation; + + private static Lazy TestCompareEnvironmentVariable => new(() => + Environment.GetEnvironmentVariable("TEST_COMPARE")); + + private static Lazy TestFilterEnvironmentVariable => new(() => + Environment.GetEnvironmentVariable("TEST_FILTER")); + + /// + /// Gets the languages to use for the test. When the environment variable + /// TEST_COMPARE is present, all detectors use the same subset of languages supported + /// by all detectors, to provide a fair detection probability comparison. As a result, accuracy reports + /// for languages not supported by all detectors will be skipped. When the environment variable is not + /// present, detectors will use all the languages that they support. + /// + public static Language[] GetLanguagesForTest(Implementation implementation) + { + var testCompare = TestCompareEnvironmentVariable.Value; + return string.IsNullOrEmpty(testCompare) + ? LanguagesByImplementation[implementation] + : LanguagesByTestedImplementations.Value; + } + + private static Lazy LanguagesByTestedImplementations => new(() => + { + IEnumerable languages = new List(LanguagesByImplementation[Implementation.Lingua]); + var testFilter = TestFilterEnvironmentVariable.Value; + if (!string.IsNullOrEmpty(testFilter)) + { + // run with the subset of languages supported by the implementations in the filter + languages = Enum.GetValues() + .Where(implementation => testFilter.Contains($"(FullyQualifiedName~.{implementation})")) + .Aggregate(languages, (current, implementation) => + current.Intersect(LanguagesByImplementation[implementation])); + } + else + { + // run just with the subset of languages supported by all + languages = LanguagesByImplementation.Values.Aggregate(languages, (current, value) => + current.Intersect(value)); + } + + return languages.ToArray(); + }); +} diff --git a/tests/Lingua.AccuracyReport.Tests/TextFileDataAttribute.cs b/tests/Lingua.AccuracyReport.Tests/TextFileDataAttribute.cs index 58c07b6..7204485 100644 --- a/tests/Lingua.AccuracyReport.Tests/TextFileDataAttribute.cs +++ b/tests/Lingua.AccuracyReport.Tests/TextFileDataAttribute.cs @@ -16,6 +16,11 @@ public class TextFileDataDiscoverer : DataDiscoverer public override bool SupportsDiscoveryEnumeration(IAttributeInfo dataAttribute, IMethodInfo testMethod) => false; } +/// +/// Data source for a parameterized test from a text file. +/// +/// The name of the sub-directory containing the text file. +/// The language of the text file. [DataDiscoverer("Lingua.AccuracyReport.Tests.TextFileDataDiscoverer", "Lingua.AccuracyReport.Tests")] [AttributeUsage(AttributeTargets.Method)] public class TextFileDataAttribute(string testDirectoryName, Language language) : DataAttribute diff --git a/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj b/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj index 06252ce..5bdf9b0 100644 --- a/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj +++ b/tests/Lingua.Benchmarks/Lingua.Benchmarks.csproj @@ -24,5 +24,9 @@ Core14.profile.xml + + + +