It might be useful to comment only on Posts with a certain language.
So you could comment in german on german posts or skip posts in a language you don鈥檛 speak at all (turkish community in big cities).
I鈥檓 not sure how to implement this. As far as I know, Instagram isn鈥檛 providing language tags for their posts, so we鈥檇 need to implement language detection in our scripts ourselves.
The old language-detection library by google handles this.
But the python port is a little slow/chunky.
Strange that in my location, 80%+ of the posts are JUST hashtags (or hashtags + emojis) or words that the library can't detect, this filter wouldn't be nice in that cenarios.
Maybe this could be useful: https://detectlanguage.com/
@GiacomoManzoli, that might be good, but it requires a user key. Should users create their own key if they want to use that feature?
Another options is this library: https://github.com/saffsd/langid.py
@pekapa That's an awesome idea!
Just the license seems to be somewhat weird...
Well, i think that the use of "detectlanguage.com" is the same that clarifai, you get you API Key and use own your own.
I will test the langid.py and the port of language-detection from google ASAP and see if there's an considerable increase of machine resources needed for the project and share with you, guys.
@pekapa Yes, i think that you need to request a key, but i've never used this service. I was just looking around for a way to implement the language support
The detectlanguage.com api looks like it would be very easy to integrate into the project, something like this maybe:
session.set_use_detectlanguage(enabled=True, secret='xyz', lang='en')
if (detectlanguage.simple_detect() != lang)
I will play around with it once we have sorted out the code clean up.
@vlntdds @littleswany @AlainPilon @pekapa I think we also have to discuss whether it is better to use an API (Signup and Keys required) or a light weight dependency...
do you guys think that the comment feature is cool ? I think that it just breaks the everyone else fun. No one likes the bot comments, it's annoying, and in most cases, people knows it's a bot comment.
Would this be a good alternative!? https://languagelayer.com
@fran6will Well, in my opinion, API's are always bad... At least for a project like InstaPy. You always have to get your API keys.
I think clarifai already is annoying to use.
A locally running tool would be best
Hi guys, i know this sounds funny but i have installed InstaPy and all is looking good but the only problem is trying to figure out where to type Clarifai API keys.
Anyone help? :)
I'm modifying the instapy to use this one: https://github.com/Mimino666/langdetect,
so far i've been able to detect the post language and i'm translating the comment to the post detected lang.
Has this ever been continued?
Did anyone make some progress here?
Most helpful comment
Well, i think that the use of "detectlanguage.com" is the same that clarifai, you get you API Key and use own your own.
I will test the langid.py and the port of language-detection from google ASAP and see if there's an considerable increase of machine resources needed for the project and share with you, guys.