Skip to content

Latest commit

 

History

History
115 lines (90 loc) · 3.93 KB

README.md

File metadata and controls

115 lines (90 loc) · 3.93 KB

DBpedia Chatbot

Project Stats BCH compliance pipeline status

Final Application

For more information about this project and GSoC Progress please refer to GSoC Wiki

DBpedia Chatbot YouTube Video

Environment Configurations

When running locally or in development include the following configuration as a properties file in the src/main/resources folder.

In case you do not have a proper CouchDB instance or API keys please use the following dummy configuration file.

Please note that using the dummy configuration file can result in some features being unavailable since they may require the requisite API services.

admin.username = <admin-username>
admin.password = <admin-password>

chatbot.baseUrl = <https-url-to-access-the-bot>
chatbot.gaID = <google-analytics-id>

chatbot.fb.appSecret = <secret>
chatbot.fb.verifyToken = <token>
chatbot.fb.pageAccessToken = <access-token>
chatbot.slack.botToken = <bot-token>

cloudant.url = <couchdb-url>
cloudant.username = <couchdb-username>
cloudant.password = <couchdb-password>
cloudant.chatDB = <couchdb-chatdb-name>
cloudant.feedbackDB = <couchdb-feedbackdb-name>
cloudant.explorerDB = <couchdb-explorerdb-name>

tmdb.apiKey = <tmdb-api-key>

wolfram.apiKey = <wolfram-alpha-api-key>

Development Only Configurations

spring.thymeleaf.cache = false
spring.devtools.livereload.enabled = true
logging.level.com.github.messenger4j = DEBUG
logging.level.com.github.messenger4j = <log-level>

Deployment

$ mvn clean install
# $PORT is the port number you want the server to run in for example 8080
$ java $JAVA_OPTS -Dserver.port=$PORT -jar target/*.jar

Development

$ mvn spring-boot:run
$ node/node node_modules/.bin/webpack --env.NODE_ENV=dev --watch

Embed Code

Add the following snippet to the <head> section of the webpage where you want to embed the ChatBot.

<script type="text/javascript">
  (function() {
    var URL = "http://chat.dbpedia.org"
    window.onload = function() {
      var iframe = document.createElement("iframe");
      iframe.setAttribute("src", URL + "/embed");
      iframe.setAttribute("frameBorder", 0);
      iframe.style.zIndex = 10000000;
      iframe.style.height = "100%";
      iframe.style.width = "40%";
      iframe.style.position = "fixed";
      iframe.style.bottom = "20px";
      iframe.style.left = "20px";
      iframe.style.display = "none";

      document.body.appendChild(iframe);
      window.addEventListener("message", receiveMessage, false);
      function receiveMessage(event) {
        if(event.origin == URL && event.data == "dbpedia-chatbot-embed-loaded") {
          iframe.style.display = "block";
        }
      }
    }
  })();
</script>

Citation

@inproceedings{ramngongausbeck2018,
  address = {Republic and Canton of Geneva, Switzerland},
  author = {Athreya, Ram G and Ngonga, Axel and Usbeck, Ricardo},
  booktitle = {WWW '18 Companion: The 2018 Web Conference Companion, April 23--27, 2018, Lyon, France},
  doi = {10.1145/3184558.3186964},
  location = {Lyon, France},
  numpages = {4},
  publisher = {International World Wide Web Conferences Steering Committee},
  title = {{Enhancing Community Interactions with Data-Driven Chatbots - The DBpedia Chatbot}},
  url = {https://svn.aksw.org/papers/2018/WWW_dbpedia_chatbot/public.pdf},
  year = 2018
}