nakster / GoProject

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This repository contains code written in the programming language Go. The author is Naqi Ahmad, a student at GMIT.

============================================================================

Running the code

  • Clone this repository using Git.
  • git clone https://github.com/nakster/GoProject.git
  • Change into the folder.
  • cd GoProject
  • Compile the web application with the following command.
  • go build main.go
  • Run the executable produced.
  • ./main.exe
  • Visit localhost:8080. Type something in the text box, and click Submit.

Specifications of the project

Project 2017

Overview

In this project you will create a chatbot web application in Go. Users will be able to visit the web application through their browser, type in sentences such as “Hi, my name is John.” and the web application will reply with sentences such as “Hello John, how are you?” You are free to use your artistic license in creating the chatbot, such as by giving it a certain type of personality, but you should be guided by the ELIZA program. If you wish to use any technique to enhance your chatbot, such as machine learning methods, that is okay as long as the chatbot works. However, reasonable care must be taken to ensure that the chatbot you create does not act in an offensive manner, and students are reminded of the GMIT Code of Student Conduct.

Instructions

  1. Create a git repository with a README.md and an appropriate gitignore file. The README should explain who you are, why you created the chatbot, how you created the chatbot, how to download and run the chatbot and any references you have used.

  2. In the repository, create a web application that serves a HTML page as the root resource. The page should contain an input textbox for the user to talk to the chatbot, and an area to display both the chatbot’s output and the user’s previous inputs. Think of applications like WhatsApp and iMessage, but in a web browser and you are talking to a bot rather than a person. The input text box should use AJAX to interact with the chatbot.

  3. Add a route to your application that accepts requests containing user inputted text and responds with the chatbot’s response.

Submission

To submit your project, you must make your git repository available using a git hosting service like GitHub or GitLab. Use the submission link on the course webpage to submit the URL for your hosted repository. You can submit at any time before the deadline, the earlier the better. The last commit you make to the repository before the deadline will be corrected irrespective of when you submitted your link. If your repository is private you must add the lecturer as a collaborator.

Sources

  1. https://github.com/kennysong/goeliza
  2. https://v4-alpha.getbootstrap.com/getting-started/introduction/
  3. https://v4-alpha.getbootstrap.com/components/forms/
  4. https://bootsnipp.com/snippets/featured/simple-chat
  5. https://stackoverflow.com/questions/7803814/prevent-refresh-of-page-when-button-inside-form-clicked
  6. https://blog.garstasio.com/you-dont-need-jquery/ajax/
  7. https://www.w3schools.com/xml/ajax_xmlhttprequest_send.asphttps://www.w3schools.com/xml/ajax_xmlhttprequest_send.asp
  8. https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight
  9. https://api.jquery.com/jquery.get/
  10. http://api.jquery.com/append/
  11. https://www.w3schools.com/jquery/
  12. https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_textarea_cols
  13. https://stackoverflow.com/questions/3580063/how-to-center-a-textarea-using-css
  14. https://www.w3schools.com/tags/att_body_background.asp
  15. https://www.w3schools.com/css/css_background.asp
  16. https://css-tricks.com/perfect-full-page-background-image/
  17. https://stackoverflow.com/questions/26661002/create-new-line-in-document-write-javascript
  18. https://stackoverflow.com/questions/19424887/remove-scrollbars-from-textarea
  19. https://stackoverflow.com/questions/26493446/change-size-of-scrollbar-thumb-with-css
  20. https://developers.google.com/web/updates/2014/01/Web-apps-that-talk-Introduction-to-the-Speech-Synthesis-API

About


Languages

Language:Go 58.7%Language:CSS 16.7%Language:JavaScript 12.9%Language:HTML 11.8%