velet5 / ufag Goto Github PK
View Code? Open in Web Editor NEWRussian-english/english-russian dictionary telegram-bot.
Home Page: https://t.me/ufagbot
Russian-english/english-russian dictionary telegram-bot.
Home Page: https://t.me/ufagbot
Now it's just a bunch of if-else statements.
At least methods should have meaningful names.
One example was found so far: "? сутра" (russian)
The first correction is "сутра", which is the same word that was in the original request.
Figure out - why that is happening.
My first assumpltion is that although question-mark prefix implies definition of the word - we are looking for corrections in the "translations" dictionary.
For example: /ask
command requires text argument, but if argument is not provided then parser considers this an unknown command.
Instead parser should return textual error message which can be sent to user.
Add /unsubscribe
and /subscribe
command to allow users manage their subscription
rewrite /help text - with examples
Problem: Now word correction suggestions are in plain text. User has to type the whole word all over again.
To do: Turn every suggestion into a button. Button tap should be treated as regular translation request.
Pretty-print oxford articles.
Analyze current "processing error" messages.
Release /ox
functionality.
Problem: bot owner's reply to /ask
isn't recognized. It's being treated like translation request.
Use LiquibaseRunner main class
For example: if for some word like "asfsadf" bot has returned "nothing is found" or "maybe you meant: asdf" - don't try to remember these queries, just ignore them
Now 404 response from oxford dictionary results in "Processing error".
Should result in "definition not found".
Make it pure functional, replace var
, @volatile
, Future
and Promise
with Ref
, Deferred
and IO
all parameters should be interfaces (for future tests)
do minimal word processing:
/ask itself is working ok.
But owner's reply to it does nothing.
Seems that storing original message id is broken.
Show information about in which context a definition is used (e.g. - military, outdated, art).
It appears docker ps --filter 'ancestor=velet5/ufag'
doesn't always work as expected.
So, old container stays there and new one cannot start, because port 8080 is occupied by the old contatiner.
Rewrite services with cats.IO
instead of Future
, use tagless final notation F[_]
If user's query hasn't resulted in an article - suggest spelling corrections for such query.
Implement this via https://developers.lingvolive.com/ru-ru/Help/Api/GET-api-v1-Suggests_text_srcLang_dstLang
Replace every "println" statement with logging through logback
Remove handlers of "/ru" and "/ox" (don't forget to remove them via BotFather)
see src/main/resources/migrations
Add /news
command available for owner only to deliver information about new features to users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.