add detail explanations about distribution algorithm optimized_bag
authorLaurent Mazet <mazet@softndesign.org>
Sat, 22 Aug 2026 18:42:26 +0000 (20:42 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Sat, 22 Aug 2026 18:42:26 +0000 (20:42 +0200)
README.md

index 60292528316d18d1062811d38d798afb9175d6ca..9192ff4f9d122b6f8513e2ec408d8d6872c07347 100644 (file)
--- a/README.md
+++ b/README.md
@@ -288,6 +288,8 @@ Once dictionaries have been built, script 'dict-dists-extractor/make_optimized_b
   Calculus 'floor((N - 15) / 10))' defines an index to choose parameter 'p' from set '{0.8 0.7 0.65 0.6}'.
   Letter value is defined by 'min(floor(1 + 9 ceil(r^p) * 100), 10)'
 
+This algorithm was designed empiricaly; it's more an engineer solution than a mathematically proven one. I've done some tests with small bags (like italian or greek with less than 23 letters) and large bags (like czech or slovakian with around 60 letters). I found that I can split them into 4 groups (without using any machine learning algorithm ;) ). For each group I tried various factor before choosing the p parameter. Then I found a polynomial formula to define values from 1 to 10 linked to letter statistics.
+
 By default, optimized bags are not presented in the bag selector. To activate
 this functionality, OPTIMIZED_LANGUAGE_BAG must be set to true in configuration
 file.