How to evaluate my publication?

Coming New Year. In Khabarovsk he has arrived, congrats!

According to tradition, we need to take stock of the outgoing year, and I decided to re-read their posts. Re-read, but how to assess them? Karma? Rating? Views? Too dry and serious. Parrots? Too serious. I decided to measure in Milfgard-Ah.


Method of measurement: get posts Milfgard, and consider the frequency of use of letters. The easiest analogue phonosematic analysis.
the
public static class SymbolsExtractor
{
private static readonly char[] _russianSymbols = "абвгдеежзийклмнопрстуфхцчшщъыьэюя".ToCharArray(); // 33 Russian letters
public static char[] RussianSymbols => _russianSymbols.ToArray();

public static Dictionary<char, double> SymbolsFrequences(this string text)
{
var symbolsQty = text.ToCharArray().Count(symbol => _russianSymbols.Contains(symbol)); // Length of text (considered only Russian letters)
double symbolPercentage = 1.00/symbolsQty; 

var result = new Dictionary<char, double>();
foreach (char russianSymbol in _russianSymbols)
{
double inclusions = text.ToLower().ToCharArray() 
.Count(textSymbol => textSymbol == russianSymbol) // Counting how many times the letter occurs in the text
* (symbolPercentage); // Divide by the length of the text
inclusions = Math.Round(inclusions, 3); // Rounded to a fraction of a percent
result.Add(russianSymbol, inclusions);
}

return result; // result: the symbols and their frequencies
} 
}


I took the last five positions, five first, and found the median. Result (Letter-Milford Early,-Late, Milgard):
the the the the the the the the the the the the
0.0864 0.09
b 0.0148 0.0172
0.043 0.0388
g 0.0164 0.0166
d 0.0294 0.0292
...
b 0 0
s 0.0228 0.0204
s 0.0176 0.0186
e 0.0038 0.0042
u 0.0064 0.0058
I 0.0186 0.018


As you can see, the difference is. To compare, obviously, need last post, I accompany 2016. It is necessary to compare quickly: two hours at the table. So the standard deviation of the median Milgard does not roll. Instead, I take the median from the posts Alizar, and comparing its median with Miliardov and Elizarovo.

the
int result = 0;

foreach (var stat in stats)
{
double MilfgardDiff = Math.Abs(stat.NewMilfgard - stat.Oxoron); // Compare midpoint and my Milfgard
double AlizarDiff = Math.Abs(stat.Alizar - stat.Oxoron); // Compare midpoint and my Alizar
char res = MilfgardDiff > AlizarDiff ? 'M' 
: Math.Abs(MilfgardDiff - AlizarDiff) < 0.0001 ? 'N' 
: 'A';
if (res == 'M') result++; // Closer to Milfgard
if (res == 'A') result--; // Closer to Alizar 
}

Console.WriteLine();
Console.WriteLine(result < 0 ? $"{-result} ALizar" : $"{result} Milfgard"); // the Result. For me - 8 Alizar


As you can see, the obtained estimation method is simple and universal. Its scope is extremely wide: you can compare its similarity with cavestany and shabistari, rubyists and pesnyami, evereste and haskeline. You can also define which JS framework is best suited to your personality. But what would the result not out yet aspire to new heights, colleagues, to other people compared themselves with you. With a holiday!

PS Milfgard and Alizar selected solely to demonstrate the working method as one of the most notable authors of chabry.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

mSearch: search + filter for MODX Revolution

Emulator data from GNSS receiver NMEA

The game Let's Twist: the Path into the unknown