telegram-ml-contest

Overview

telegram-ml-contest

This repo contains solution for the task described in telegram-ml-contest.

Task definition

The task is to classify programming language by the code snippet. Time of execution for the solution should not exceed 10 ms for a 4096 bytes snippet.

Dataset

The dataset contains code snippet taken from the private repos on Github. Languages presented there include not only the most spread but also rare ones.

Screenshot 2023-10-13 at 20 52 13

More detailed information on the content may be found on Kaggle.

Solution

The taks is solved with the combination of Naive Bayes with TF-IDF vectorizer. For sake of execution time the final version were written using Rust instead of Python.

Multinomial Naive Bayes

The family of Naive Bayes classifiers assume independence between variables. They do not model moments between variables and lack therefore in modelling capability. The advantage is a linear fitting time with maximum-likelihood training in a closed form. Linfa bayes were used in this solution, more info you will find here

TF-IDF Vectorizer

Simlar to CountVectorizer but instead of just counting the term frequency of each vocabulary entry in each given document, it computes the term frequecy times the inverse document frequency, thus giving more importance to entries that appear many times but only on some documents. The weight function can be adjusted by setting the appropriate method. More information here.

Execution

The dataset snippets get transformed with TF-IDF vectorizer then the transformed dataset delivered into Multinomial Naive Bayes which creates final prediction.

Library

The final model is packed as shareble object wich can be plugged into various services.

You might also like...
Telegram bot for searching in Arch User Repository ( AUR ); Implemented using rust.

AurSearchBot A Telegram Inline Search Bot Written in Rust Introduction Telegram Bot that can search AUR ( Arch User Repository ) in inline mode. This

A small monitoring process that checks if kstars is active, if not it sends a request to notify a user via telegram that it crashed

Astro monitor A small monitoring process that checks if kstars is active, if not it sends a request to notify a user via telegram that it crashed Inst

A simple twitter - telegram forwarder written in Rust.

twitter-telegram-forwarder A simple twitter - telegram forwarder written in Rust. Example channel: https://t.me/nanabunnonijyuuni_tweet How to use it

Uradhura is a telegram bot that fetches information and media from reddit
Uradhura is a telegram bot that fetches information and media from reddit

Pathetic little Telegram bot that fetches information from Reddit posts(with gif, image(post with single image) and video)

Autogenerated wrapper for the Telegram Bot API written in Rust.
Autogenerated wrapper for the Telegram Bot API written in Rust.

An Elegant Rust Client for Telegram Bot API crates.io • docs.rs Table of contents Introduction Key Features Installation Getting Started Documentation

A Telegram bot to watch animes

AmimeWatch A Telegram bot to watch animes. Re-written version of AmimeWatch in Rust. Preparing Configuration Create a file named config.toml and fill

A simple Telegram bot that eats anonymous channel messages, written in Rust.

tgbot-nochanmsg By Asuna Right Control When creating your bot from botfather, it's not bad to disable privacy mode, because it needs to access the mes

An out-of-box ChatGPT bot for Telegram.
An out-of-box ChatGPT bot for Telegram.

TeleGPT API Docs | Releases | Twitter An out-of-box ChatGPT bot for Telegram. TeleGPT is a Telegram bot based on teloxide framework and async_openai.

An out-of-box ChatGPT bot for Telegram.
An out-of-box ChatGPT bot for Telegram.

TeleGPT API Docs | Releases | Twitter An out-of-box ChatGPT bot for Telegram. TeleGPT is a Telegram bot based on teloxide framework and async_openai.

Owner
igor.pereverzev
igor.pereverzev
Telegram bot help you to run Rust code in Telegram via Rust playground

RPG_BOT (Rust Playground Bot) Telegram bot help you to run Rust code in Telegram via Rust playground Bot interface The bot supports 3 straightforward

TheAwiteb 8 Dec 6, 2022
A Simple, But amazing telegram bot, Made using the Rust language!

Telegram bot in Rust A fun Telegram bot made using Rust language.

Deep Alchemy 2 Dec 21, 2021
This is a Telegram bot I'm working on in my free time to learn Rust.

Maldness Bot This is a Telegram bot I'm working on in my free time to learn Rust. Building docker build -t . should be enough.

Sergey Kislyakov 10 May 13, 2022
Parses go-ethereum logs and pipes them to telegram

parrot Middleware that accepts logs via stdin and redirects them to Telegram, based on a configurable set of conditions.

null 6 Jul 25, 2022
This is a simple Telegram bot with interface to Firefly III to process and store simple transactions.

Firefly Telegram Bot Fireflies are free, so beautiful. (Les lucioles sont libres, donc belles.) ― Charles de Leusse, Les Contes de la nuit This is a s

null 13 Dec 14, 2022
Source code for the Telegram channel @pixiv_daily

PixivDaily (Rust) This repository contains the source code of the program running the Telegram channel @pixiv_daily. Usage First, you'll need to clone

K4YT3X 5 Jun 23, 2022
IITC-CE Telegram Chat Spam Protection

ADA AntiBot This bot bans spammers in Telegram chat. Run To run you should export environment variables: TELOXIDE_TOKEN - telegram bot token TELEGRAM_

Ingress Intel Total Conversion — Community Edition 4 May 23, 2022
Telegram Bot Template with Cloudflare Workers

cf-workers-telegram-bot-template Usage This template starts you off with a src/lib.rs file, acting as an entrypoint for requests hitting your Worker.

Lee Taehoon 2 Sep 23, 2021
Rust telegram bot library for many runtimes

Telbot Telbot provides telegram bot types and api wrappers. Specifically, telbot now supports: telbot-types: basic telegram types / requests / respons

kiwiyou 17 Dec 3, 2022
Telegram bot that zhuzh Twitter content

@twt_2_tg_bot Telegram bot that zhuzh shared Twitter content Text converter Some tweets may contain line breaks or even dialogs. Such tweets are barel

Vladimir 6 Nov 6, 2022