Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want to develop a conversational chatbot for chinese language in python like the user says "你好" which means "hello" in chinese and chatbot respond. i think it will be very difficult to build from scratch and write every expected response for chatbot. i want to find an opensource library to connect with my API which is able to respond to user and do the conservation with the user. i already know about a chatbot developed by Microsoft called "Xiaobing" which is especially developed for chinese people but i don't know if they provide an API for developers or not.There is also another github project called brobot(https://github.com/lizadaly/brobot/)
but i don't know if it provide chinese language support. Any suggestions or guidance from anyone here would be appreciated.
Have a look at ChatterBot Python module. It is language independent. Means you can train it with any language.
sample snippet to train your bot.
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
chatbot = ChatBot("bot") # create an instance of ChatBot and name it.
chatbot.set_trainer(ListTrainer)
data = ["你好",
"我很高兴认识你"] # add data for training
chatbot.train(data) # train the bot
while True:
try:
user_input = input("you - ") # ask something to bot
bot_input = chatbot.get_response(user_input) # get curresponding output from bot
print("bot - ",bot_input)
except(KeyboardInterrupt, EOFError, SystemExit):
break
output:
List Trainer: [####################] 100%
you - 你好
bot - 我很高兴认识你
You can train it with more and more conversations. Just add those conversation in a text file and train with it.
Refer ChatterBot docs for further information on training the data.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed yesterday.
Improve this question
I have created an Alexa skill in python which is working fine for my expected intents.
Now I want to add a functionality in that skill such that if my skill is opened/triggered on any device with a display (ex: Echo show) then it will show either my whole conversation on Display or the final part or some part of chat that I want to deliver on the display device.
I have gone through the official documentation of the Alexa skill it says something like that "you have to use APL", but it doesn't clearly mention how to do it in python from scratch, can you tell me the process to build the feature from scratch.
A step-by-step guide using the Alexa developer console for Python would be beneficial.
You can develop the screen directly within the developer console.
Then, when you respond to the request received by a user interaction, you have to include the directive to add this APL document.
(Only if the device support it: context.System.device.supportedInterfaces.Display)
I recommend you to be familiar with the Alexa Skills kit SDK for python on the official documentation (it includes examples and sample skills).
And you should also follow the zero to hero video tutorials about developing an Alexa skills. It usually respond to 99% of all your actual & future questions.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 months ago.
Improve this question
I am using Pixellib library in Python to detect a person and change its background, as shown in their example here.
It works flawlessly, but takes huge processing power on my laptop, coupled with their large (~150mb) pascalvoc model, thus rendering an image in approx 4-5sec.
I need to be able to do the same via a mobile phone app, so certainly this cannot be run on a user's mobile. Alternative is to run this on cloud and return the processed image back. This is both costly if user requests increase and will still have noticable lag on user's app.
So, how do achieve this? Apps like Canva Pro seem to do this seamlessly in an app fairly quickly. In fact, there are many other 'free' apps on Play store claiming to do the same.
Thus, is there a better way to run Pixellib, to make it more performant? Or any other library that can provide similar (or better) ouptut and can be run on user's mobile?
There is remove.bg
It is the most easy tool,to remove background automatically
Sample code:-https://www.remove.bg/api#sample-code
Screenshots:
Here is an example of doing in Python:
# Requires "requests" to be installed (see python-requests.org)
import requests
response = requests.post(
'https://api.remove.bg/v1.0/removebg',
files={'image_file': open('/path/to/file.jpg', 'rb')},
data={'size': 'auto'},
headers={'X-Api-Key': 'INSERT_YOUR_API_KEY_HERE'},
)
if response.status_code == requests.codes.ok:
with open('no-bg.png', 'wb') as out:
out.write(response.content)
else:
print("Error:", response.status_code, response.text)
Since your are using python ,
This https://github.com/brilam/remove-bg by #brilam will help you.
It is a Python API wrapper for removing backgrounds from picture using remove.bg's API.
But it also offers go based command line tool:-https://github.com/remove-bg/go
In addition to that, there are many other opensource library for python in GitHub for your reference: https://github.com/topics/background-removal?l=python
Also, you can try,
https://github.com/danielgatis/rembg
OR, refer research paper for your understanding: https://arxiv.org/pdf/2005.09007.pdf
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am currently working on a home automation project. When Windows 10 was released my speech recognition API became incompatible. Is there an openly available API to use Cortana, if not is it possible to tap into the speech recognition API?
Python 2.7
Windows 10
The Dragonfly Speech API is no longer working, it used the windows voice recognition.
My ultimate goal is to not use a launch phrase, I want my AI to listen to everything I say. If I randomly ask a question I want an answer. I have the AI part covered but the voice input it my biggest problem.
Thanks for the help, I am looking forward to the answers!
(Note: This is not a duplicate question due to the Windows 10 complications.)
I recently visited one of Microsoft's offices in Germany and asked some of the Cortana evangelists if Cortana would be open-sourced, or if they were planning on developing a speech recognition API. They told me about the possibility of launching foreground apps with Cortana, but said an open API is not in the pipeline for now.
It may be better to look into the Google speech recognition API:
https://progfruits.wordpress.com/2014/05/31/using-google-speech-api-from-python/
It is limited to 50 requests a day, but the accuracy is fairly good.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
As a engineering student, I would like to make a chat bot using python. So, I searched a lot but couldn't really find stuff that would teach me or give me some concrete information to build a intelligent chat bot.
I would like to make a chatbot that gives human-like responses (Simply like a friend chatting with you). I am currently expecting it to be as just a software on my laptop (would like to implement in IM, IRC or websites later).
So, I am looking for a tutorial/ any other information which would certainly help me to get my project done.
You can read a nice introduction to various techniques used to design chatbots here: http://www.gamasutra.com/view/feature/6305/beyond_fa%C3%A7ade_pattern_matching_.php
Also, here are a few useful links:
http://web.archive.org/web/20120320060043/
http://ai-programming.com/bot_tutorial.htm
http://www.alicebot.org/be.html
http://en.wikipedia.org/wiki/List_of_chatterbots
http://www.codeproject.com/Articles/36106/Chatbot-Tutorial
http://www.slideshare.net/amyiris/ai-and-python-developing-a-conversational-interface-using-python
The Natural Language Toolkit (python) implements a few chatbots: http://nltk.github.com/api/nltk.chat.html
Simple pipeline architecture for a spoken dialogue system from the book Natural Language Processing with Python - Analyzing Text with the Natural Language Toolkit By Steven Bird, Ewan Klein, Edward Loper:
The two places I would start with are how cleverbot works [part of a podcast] and then go through the Natural Language Toolkit Book to learn about the algorithms to use. (NLTK uses python, but the book is also a python tutorial)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there any production ready open source twitter clones written in Ruby or Python ?
I am more interested in feature rich implementations, not just bare bones twitter like messages (e.g.: APIs, FBconnect, Notifications, etc)
Thanks !
I know of twissandra which is an open source clone. Of course I doubt it meets your need of feature rich implementations.
http://github.com/rnielsen/twetter
From their readme:
Twetter is an implementation of the twitter.com API, designed for use in situations where internet access is not available but a large number of people have twitter clients and want to tell each other what they are doing, for example a RailsCamp, where it was first developed.
The current goal is to have it work with as many third party twitter clients as possible. It has currently been tested with Twitterific, TwitterFox, and Spaz on OSX.
The following open source alternative to twitter : http://identi.ca/ is written using the the software http://status.net/ . It looks like it is written in PHP too.
Also there is http://code.google.com/p/jaikuengine/ which is a microblogging platform for google app engine. This should serve as an example for python implementation.
Also look at http://www.typepad.com/go/motion/
Found two relevant projects:
http://github.com/insoshi/insoshi
http://github.com/dmitryame/echowaves/wiki
Sadly both appear discontinued