Support multiple languages in a single bot - telegram

I have a plan to support several (3 for now) languages in my bot (that has only one now) and I can't decide is it better to have separate bots (one for each language) or a single multilingual bot. For multiple bots pros are that I can specify description/name in correct language and it is not required to ask new users to choose a language (in all bot stores now it is not possible to specify multiple descriptions also). But it is a bit more difficult to maintain them. Anyone has an experience on it and could suggest something?
Thanks!

I'd say you can manage your multilangual bot as the same way an app or website is internationalized.
Nothing more, nothing less. Just a user preference for the user language and the strings translated for the bot.
I would not worry about the language description: use english. You can always market the bot on different sites using different languages.

Related

Firebase - Machine Learning and interest tracking to create an algorithm for sorting posts

One of my applications includes user-generated posts and functions in a similar way to Instagram. When a user opens the app they see a feed of posts sorted by date. This works when there just one small demographic using the app, but as the user base becomes more diverse, not everyone is interested in the same posts. This is why apps like TikTok and Instagram have algorithms to decide which posts to show to a user. Where do I even start with this? I understand that there need to be tags on each post for what they are about (this is where I think I can use machine learning) and then each users information needs to include their interests (I’m not sure what can be used to change this as they like or dislike posts). Is there a simple pre-built way of doing this or any examples? It seems fo be a pretty big secret that mostly big tech companies understand and use.
You could use Google's "cloud vision api(For Images): https://cloud.google.com/vision" and "Video Intelligent Api(For videos): https://cloud.google.com/video-intelligence/docs".
Video Intelligence Api could handle images too from byte stream.
Build a firebase function that analyse posted media with these api.
Build the rest of the logic from here. Find a way to detect their interest from post, save their interests.

GDPR and Google Translate

are there any detailed information on Google Translate and the GDPR?
In my opinion, translating personal data with the google translate widget is an big issue here, especially if you run an online-store and the user translates pages while checking out (i.e.: last checkout step, where all the personal data including cart-positions, billing-information and user contact-information are preset).
There is a way the exclude parts of the website from being translated (adding "notranslate" class attribute), but i assume the data itself is send to google translate servers anyway?
Looking forward to an answer.
Best regards,
Andrea
Collect some statistics about your visitors and implement localization for major languages they use.
This will probably prevent users from using google translate for your checkout process.

which blog software manages multiple language posts, modular privacy, and custom RSS syndication?

I'm considering which software to use for a blog that I would like to install in a personal home server (synology). Here are my requirements:
Language management: I'll be writing in different languages, and some entries would be translated in different languages, not always the same. Blog readers should be able to select which languages they can/wish to read. For instance, if they chose English, then all entries which have English translation would appear in English, the remaining appearing in whatever language they were written, or not at all.
RSS customization: the blog will broach different subjects. I would like the users to be able to customize a RSS syndication which corresponds to their interests, so that the sigal to noise ration in their RSS readers remains bearable. This should probably work with a "Categoriy" or "Tag" system.
sub-blogs: I would like to have sub-blogs with their own url, which would present a subset of the blog entries. For instance my blog could deal with politics, sports, and myLife, and I could produce the following blog urls: blog.mydomain.tld (shows everything), opinions.mydomain.tld (shows only the politics related posts), sports.mydomain.tld (all entries dedicated to sports). I would also like to theme differently those sub-blogs (i.e. a ball picture for sports.mydomain.tld, etc).
modular privacy: my intended audience is heterogeneous (family, sets of friends, the internet), and I would like to be able to limit access to certain entries to different subsets of users. To me, the most obvious way to do this would be to define users with a login and password. I would then pool them into groups, and define for each entry if it is private, and if so which groups can read it. I do not necessarily want to share the same things between my neighbors and my school friends.
That also brings the issue of RSS syndication: either each user would have its how RSS thread, or then RSS could be category specific and the private entries would appear without content. Perhaps other possibilities exist.
These set of features are quite specific. I was thinking of using a blog software to implement them, but perhaps I'm thinking this wrong and I should use a CMS or even a framework?
Another point is that this is done for "fun", and although I can program (python, etc), this is not my day job, so it should not require expert level skills or full time investment to implement. A solution which involves me developing a whole new blog application is not adapted to my constraints.
EDIT
OpenID: I like the Stack Overflow login system (check this screen capture of it), because most readers already have an OpenID, and in any case do not need to create a specific one for my blog. The system I would use should be capable of using the OpenID method of authentication
I don't know what is the best translation software around.
But I only use a Babylon Software as an Online Translator too.
You can find it at http://babylon.depapaz.com
Till now, I only use this program for my online translation software.
And I think is good enough as a Translation Software.

How to scrape websites such as Hype Machine?

I'm curious about website scraping (i.e. how it's done etc..), specifically that I'd like to write a script to perform the task for the site Hype Machine.
I'm actually a Software Engineering Undergraduate (4th year) however we don't really cover any web programming so my understanding of Javascript/RESTFul API/All things Web are pretty limited as we're mainly focused around theory and client side applications.
Any help or directions greatly appreciated.
The first thing to look for is whether the site already offers some sort of structured data, or if you need to parse through the HTML yourself. Looks like there is an RSS feed of latest songs. If that's what you're looking for, it would be good to start there.
You can use a scripting language to download the feed and parse it. I use python, but you could pick a different scripting language if you like. Here's some docs on how you might download a url in python and parse XML in python.
Another thing to be conscious of when you write a program that downloads a site or RSS feed is how often your scraping script runs. If you have it run constantly so that you'll get the new data the second it becomes available, you'll put a lot of load on the site, and there's a good chance they'll block you. Try not to run your script more often than you need to.
You may want to check the following books:
"Webbots, Spiders, and Screen Scrapers: A Guide to Developing Internet Agents with PHP/CURL"
http://www.amazon.com/Webbots-Spiders-Screen-Scrapers-Developing/dp/1593271204
"HTTP Programming Recipes for C# Bots"
http://www.amazon.com/HTTP-Programming-Recipes-C-Bots/dp/0977320677
"HTTP Programming Recipes for Java Bots"
http://www.amazon.com/HTTP-Programming-Recipes-Java-Bots/dp/0977320669
I believe that the most important thing you must analyze is which kind of information do you want to extract. If you want to extract entire websites like google does probably your best option is to analyze tools like nutch from Apache.org or flaptor solution http://ww.hounder.org If you need to extract particular areas on unstructured data documents - websites, docs, pdf - probably you can extend nutch plugins to fit particular needs. nutch.apache.org
On the other hand if you need to extract particular text or clipping areas of a website where you set rules using DOM of the page probably what you need to check is more related to tools like mozenda.com. with those tools you will be able to set up extraction rules in order to scrap particular information on a website. You must take into consideration that any change on a webpage will give you an error on your robot.
Finally, If you are planning to develop a website using information sources you could purchase information from companies such as spinn3r.com were they sell particular niches of information ready to be consume. You will be able to save lots of money on infrastructure.
hope it helps!.
sebastian.
Python has the feedparser module, located at feedparser.org that actually handles RSS in its various flavours and ATOM in its various flavours. No reason to reinvent the wheel.

Categorized Document Management System

At the company I work for, we have an intranet that provides employees with access to a wide variety of documents. These documents fall into several categories and subcategories, and each of these categories have their own web page. Below is one such page (each of the links shown will link to a similar view for that category):
http://img16.imageshack.us/img16/9800/dmss.jpg
We currently store each document as a file on the web server and hand-code links to these documents whenever we need to add a new document. This is tedious and error-prone, and it also means we lack any sort of security for accessing these documents. I began looking into document management systems (like KnowledgeTree and OpenKM), however, none of these systems seem to provide a categorized view like in the preview above.
My question is ... does anyone know of any Document Management System that allow for the type of flexibility we currently have with hand-coding links to our documents into various webpages (major and minor , while also providing security, ease of use, and (less important) version control? Or do you think I'd be better off developing such a system from scratch?
If you are trying to categorize the files or folders in the document management system, That's not a difficult task. You only need to access to admin panel to maintain the folders or categorize the folders
In Laserfiche, You can easily categorize your folders regarding the departments and can also be subcategorized them
You should look into Alfresco. It's extremely extensible and provides a lot of ways of accessing the repository.
Note: click the "Developers" tab for the community edition.
My question is ... does anyone know of
any Document Management System that
allow for the type of flexibility we
currently have with hand-coding links
to our documents into various webpages
(major and minor , while also
providing security, ease of use, and
(less important) version control?
Or do you think I'd be better off developing such a system from scratch?
Well there are companies that make a living selling doc management software. Anything you can get off the shelf is going to be a huge time saver, and its going to be better than anything you could reasonably develop by hand.
I've used a few systems:
Sharepoint: although I hear some people don't like it, I didn't either ;)
HyperOffice worked really well for my company of around 150 employees and has all the features you describe.
Current company uses Confluence, I like it :) But its probably one of those tools whose pricetag isn't worth it, especially if you're only using a subset of its features like doc management.
I haven't used it, but one guy I know raves about Alfresco, a free and open source doc management system. I looked at its website, seems simple enough to use.
We also faced a similar problem. However version control was more on our priority and we did look into many solutions in and around. We found Globodox extremely easy to install and use and more important the support team was absolutely fantastic
Try Mayan EDMS, it's Django based, and open source, used it as a base and build the custom features you wish on top of it.
Code location: https://gitlab.com/mayan-edms/mayan-edms
Homepage at: http://www.mayan-edms.com
The project is also available via PyPI at: https://pypi.python.org/pypi/mayan-edms/

Resources