Code Monkey home page Code Monkey logo

ibm-watson-javafx-project's Introduction

IBM Watson JavaFX Project

This was an assignment from university. Where we had to create a Java application that uses IBM Watson's API.

This project use’s 2 of IBM Watson API’s. The API’s I use are Personality Insights and the Tone analyser.

My application allows the user to enter text into the text area or select a text file and then edit it in the text area. Then the user presses analyse and the text gets sent to IBM Watson, the returned JSON file gets parsed and the data is displayed in 2 pie charts, a bar chart and line chart inside a scroll viewer on the right side of the application.

The user can analyse text an unlimited number of times.

The user even has the option to reset the application to the original load state but pressing the reset button in the menu bar at the top of the application.

Here is a video demonstration of the web application -

IMAGE ALT TEXT HERE

IBM Watson

“Watson is an IBM supercomputer that combines artificial intelligence (AI) and sophisticated analytical software for optimal performance as a “question answering” machine. The supercomputer is named for IBM’s founder, Thomas J. Watson.”

IBM Watson has a lot of API’s that can be used so in this project I use the personality insights API and the tone analyser API.

Both API’s work, in the same way, you send some text to IBM Watson and receive a JSON file containing all the results.

Use of Libraries

In this project, I used GSON to convert the returned JSON files to java objects. GSON is a java library created by google.

“Gson is a Java library that can be used to convert Java Objects into their JSON representation. It can also be used to convert a JSON string to an equivalent Java object.”

Graphical User Interface (GUI)

Before this term, I have never created a GUI in java. After messing around with swing, I decided to learn a bit of JavaFX to complete the assignment. The reason I decided to do this is because when I started to do some research into JavaFX it looks more efficient and cleaner than creating a GUI with swing. This because the layout/structure of the GUI is in one file (FXML) and the logic is attached to it through a controller class (MVC).

By doing it this way it would be a lot easier to change between layouts because all the logic is separated into a separate class (controller).

ibm-watson-javafx-project's People

Contributors

ieuanwalker avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ibm-watson-javafx-project's Issues

Setup Airbrake for your Java application

Step 1: Install

Install option 1: Maven

Add the javabrake dependency through your IDE or directly to your pom.xml file:

<dependency>
  <groupId>io.airbrake</groupId>
  <artifactId>javabrake</artifactId>
  <version>0.1.4</version>
  <type>pom</type>
</dependency>

Install option 2: Gradle

Add javabrake to your Gradle dependencies:

compile 'io.airbrake:javabrake:0.1.4'

Install option 3: Ivy

Add javabrake to your Ivy dependencies:

<dependency org='io.airbrake' name='javabrake' rev='0.1.4'>
  <artifact name='javabrake' ext='pom'></artifact>
</dependency>

Step 2: Configuration

Copy this configuration snippet into your Java app.

(You can find your project API KEY with your project's settings)

import io.airbrake.javabrake.Notifier;

int projectId = <Your project ID>;
String projectKey = "<Your project API KEY>";
Notifier notifier = new Notifier(projectId, projectKey);

notifier.addFilter(
    (Notice notice) -> {
      notice.setContext("environment", "production");
      return notice;
    });

Example of reporting a caught exception:

try {
  do();
} catch (IOException e) {
  notifier.report(e);
}

Visit our official GitHub repo for advanced information and integrations like log4j, log4j2, and logback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.