Saturday, March 31, 2018

Skype Bot for english words

В поиске способа учить английские слова, понравилась идея создать бота, который будет уделять некоторое время для меня, спрашивая слова по словарю, который я ему предложу.

Для того, чтобы создать локального бота, нужна Visual Studio 2017, Bot Framework Template, Bot Framework Emulator. Дальше пригодится уже готовый BotTranslator, как базовый бот с которого стоит начать, и еще подписка Microsoft Azure в которой есть бесплатный уровень.

Ссылки на приложения: BotFramework-Emulator   BotTranslator
  

Ссылки 
Developing Intelligent Bots from Zero to Hero
Syncfusion book : Skype Bots Succinctly

Интересно, что бота можно создать в Viual Studio 2015 Community Edition, но предпочтительнее Visual Studio 2017.

Для использования бота  на локальном компьютере без привязки к удаленному серверу необходим Direct Line API и еще пригодится Web Chat Control если необходимо развернуть приложение на Linux.

Messing backed :

Web Chat Control использует Type Script, Redux для управления состояниями и RxJS для асинхронности. В локальном боте можно даже убрать BotAuthenticationAttribute, отвечающий за https.

Bot Machine Learning Layer :

NLP+NLU+NLG = Natural language processing, understanding and generation.

Сразу стоит посмотреть какие слова доминируют по смыслу как в самом Bot Builder, так и в прмерах Bots From Zero To Hero и Skype Bots Succinctly.  Диаграмму можно составить из самых часто встречающихся слов с помощью tagcrowd.com



Для первой версии ориентироваться стоит на полностью offline работы бота, ведь для того чтобы спрашивать слова и проверять их знание нужно записать слова в память бота вместе с их переводами. Для этого каждый день в файл на компьютере я писал слова в таком виде:

en:Translations of luminosity
noun
   
светимость
   
luminosity, radiance, radiancy

И для того чтобы получить слова из файла в боте я использовал NTextCat который может проверять где слово на английском, а где перевод на русский. На практике я использую слова, для работы и храню их в тестовом файле, просто копируя из онлайн переводчика к себе в блокнот. Бот с легкостю может пополнить словарь именно из слов которые нужно выйчить.

Wednesday, March 7, 2018

Parallel external merge sorting for GitHub code base


Imagine having access to 25 million repositories hosting over 1 billion commits each year. These repositories span diverse languages and platforms, constituting an immense collection of knowledge. The statistics I just mentioned pertain to GitHub's data for the year 2017.

One immediate benefit of this vast collection is the potential to find existing solutions for your own projects. Instead of starting from scratch every time, you can leverage the wealth of shared code to gain valuable insights.

However, searching for the right solution on GitHub can be a challenge. So, how can you effectively navigate this vast repository?

One approach is to extract domain-specific subjects from the code and then filter projects accordingly, focusing only on those relevant to your specific domain. But here's the catch: the source code files often contain an overwhelming amount of information. With file sizes reaching terabytes, not all sorting algorithms are equipped to handle this big data efficiently.

This is where Dzmitry Huba's contribution comes in. Dzmitry Huba has described a groundbreaking algorithm called the Parallel External Merge Sorting algorithm, designed specifically for managing big data on small computers with limited disk space and memory. Thanks to this algorithm, you can now parse code files and analyze the frequency of words used within them. By employing Parallel External Merge Sorting, you can identify the most commonly used words efficiently.

To achieve this, it's advisable to sort the words in each file individually and then identify any peculiar or unusual terms that stand out.

public static void Main (string[] args)
        {
            if (Directory.Exists (args [0])) {
                var words = new List<string>();
                File.Delete(args[2]);
                foreach (var file in Directory.GetFiles(args[0], args[1], SearchOption.AllDirectories))
                {
                    string txt = File.ReadAllText(file);

                    Regex reg_exp = new Regex("[^a-zA-Z0-9]");
                    txt = reg_exp.Replace(txt, " ");

                    // Split the text into words.
                    words.AddRange(txt.Split(
                        new char[] { ' ', '\t', '.', '(', ')', '[', ']', '{', '}', '+', '-', '*', '/' },
                        StringSplitOptions.RemoveEmptyEntries));

                    //LINQ Distinct operator, ignore case?
                    //https://stackoverflow.com/questions/283063/linq-distinct-operator-ignore-case?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
                    var word_query = words
                         .GroupBy(w => w)
                         .OrderByDescending(kv => kv.Count());

                    File.AppendAllText(args[2], string.Join(Environment.NewLine, word_query.Select(kv => string.Format("{0}:{1}", kv.Key, kv.Count()))));
                }
            }
        }

By utilizing Dzmitry Huba's parser and the power of Parallel External Merge Sorting, you can now extract valuable insights from the vast pool of code available on GitHub.

Sunday, March 4, 2018

Introduction

Greetings, everyone!

Welcome to my blog dedicated to software engineering and effective problem-solving techniques. My name is Yevhen Pyrohov, and I am a software engineer residing in Ukraine. With a strong educational background in information technologies, I have been passionately engaged in C# programming for the past fourteen years.

Feel free to explore my public repositories on A.R.I.S.E project GitHub and a lot of hisric repos on Bitbucket.

I also invite you to enjoy some delightful music and immerse yourself in captivating sounds available on archive.org.

Stay tuned for insightful articles and practical insights on software engineering and effective problem-solving techniques. Make sure to bookmark this blog and join the vibrant community of software enthusiasts.

Thank you for visiting, and I look forward to sharing my knowledge and experiences with you.

debug magazine archive

  71 jounals still available on issuu with great story of netlabels time.  debug_mag Publisher Publications - Issuu