Репост из: Telegram Info English
Programming Language Classifier by Telegram
Today Telegram announced a new contest to create a library for programming language detection using Machine Learning algorithms. Almost simultaneously Telegram Desktop repository was updated to add hints on the ongoing work to add programming language syntax highlighting. The @tginfo team connects these events and speculates that Telegram is probably working on automatic code highlighting in messages.
There are existing libraries for automatic programming language detection, but all of them are making mistakes often enough.
Such highlighting is not really needed in all messages, and attempts to do it automatically adds unpredictability, which not everyone will be happy about: “Will Telegram decide to mistakenly highlight this segment of monospace text?” or “Will the programming language be detected correctly?”
The @tginfo editors hope the messenger will give choice to either use the automatic language detection or not. Besides that, we're curious about the quality of the solutions that will be developed by the ML engineers in a 10 day deadline set by the contest.
The Telegram API has an option to declare the programming language for a code block since its early days, but almost none of the official apps implement that in the UI, with the exception of Telegram WebA.
In Telegram WebA you can declare a code block with a specified programming language for syntax highlighting the following way:
```js
console.log(123 + "Text");
```
For example, in Nekogram, an unofficial Telegram client for Android, you can create a monospace fragment by either “Mono” or “Code” formats. The “Code” option allows to manually select appropriate language for syntax highlighting while also giving you an option to not use highlighting at all.
Syntax highlighting works only in Telegram WebA and some unofficial apps.
Do you think you need automatic programming language detection for syntax highlighting, or you'd prefer doing it manually?
Today Telegram announced a new contest to create a library for programming language detection using Machine Learning algorithms. Almost simultaneously Telegram Desktop repository was updated to add hints on the ongoing work to add programming language syntax highlighting. The @tginfo team connects these events and speculates that Telegram is probably working on automatic code highlighting in messages.
There are existing libraries for automatic programming language detection, but all of them are making mistakes often enough.
Such highlighting is not really needed in all messages, and attempts to do it automatically adds unpredictability, which not everyone will be happy about: “Will Telegram decide to mistakenly highlight this segment of monospace text?” or “Will the programming language be detected correctly?”
The @tginfo editors hope the messenger will give choice to either use the automatic language detection or not. Besides that, we're curious about the quality of the solutions that will be developed by the ML engineers in a 10 day deadline set by the contest.
The Telegram API has an option to declare the programming language for a code block since its early days, but almost none of the official apps implement that in the UI, with the exception of Telegram WebA.
In Telegram WebA you can declare a code block with a specified programming language for syntax highlighting the following way:
```js
console.log(123 + "Text");
```
For example, in Nekogram, an unofficial Telegram client for Android, you can create a monospace fragment by either “Mono” or “Code” formats. The “Code” option allows to manually select appropriate language for syntax highlighting while also giving you an option to not use highlighting at all.
Syntax highlighting works only in Telegram WebA and some unofficial apps.
Do you think you need automatic programming language detection for syntax highlighting, or you'd prefer doing it manually?