Skip to content

paulsoiya/GM-Capstone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##GM Capstone README

This is the README for the ASU / GM eProject, also known as a Capstone.

Project Structure:

The Web Page files will reside under src/main/webapp

The Java files will reside under src/main/java/com/gm (the com/gm is a java standard package naming convention)

GM-Capstone/
├── src/
│...├── main/
│......├── java/
│......│...├── com/
│......│......├── gm/ (The java files will be here in separate packages)
│......├── webapp (HTML/CSS/Javascript files will be here)

│......├── resources
│.........├── META-INF (Contains the persistence.xml file used for defining persistence units)
│.........├── SQL (Contains the database model and SQL files)

Development Setup

Dependencies

Build entire project

  1. Uses "mvn" to build, simply use the following command in the root directory:
  • mvn clean install
  1. TODO: what else we need to do

Java application to stream Twitter

├── gm/
│...├── twitterstream/
│......├── lib/
│......├── src/
│......├── build.xml
│......├── couchdb_setup.bat │......├── twitter4j.properties │......├── build.properties

  1. Database setup script in src/main/resources/sql/master-gm-db-setup.sql must have been run on machine with a MySQL install. In MySQL Workbench:
  • File > New Query Tab
  • Type "CREATE DATABASE dbname;"
    -- # NOTE: Currently, dbname = testGM
  • Query > execute
    -- # OR, click the lightning bolt
  • File > Open SQL Script... > master-gm-db-setup.sql
  • Query > execute -- # OR, click the lightning bolt
  1. Ensure your SQL root password is correct:
  • In build.properties input your credentials
  • stanbol points to your default enhancement chain described below
  1. On machine with couch installed, run couch_setup.bat
  • set couch property in build.properties to point to your db
  1. twitter4j.properties contains your twitter streaming api key
  • obtain an access token from twitter
  1. Uses "ant" to build, simply use the following commands in the twitterstream directory:
  • ant compile
  • ant execute

Apache Stanbol Installation

  1. There is no server provided for Apache Stanbol, you must run your own instance of the service.
  • export MAVEN_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
  • svn co http://svn.apache.org/repos/asf/stanbol/trunk stanbol
  • cd stanbol
  • mvn clean install
  • cd launchers
  • java -Xmx1g -jar stable/target/org.apache.stanbol.launchers.stable-1.0.0-SNAPSHOT.jar
  1. In a new terminal, go to the following directory in your stanbol directory:
  • cd stanbol/data/sentiment/sentiwordnet
  • mvn install -DskipTests -PinstallBundle -Dsling=http://localhost:8080/system/console -- This needs to be done each time the instance of stanbol is launched.
  1. Add sentiment-wordclassifier and sentiment-summarization to the engines in the default chain
  • Go here: http://localhost:8080/enhancer/chain
  • Click the configure link next to default, default credentials admin/admin
  • Set the engine chain to this order:
  • langdetect
  • opennlp-sentence
  • opennlp-token
  • opennlp-pos
  • opennlp-ner
  • sentiment-wordclassifier
  • sentiment-summarization
  1. Stanbol's endpoint example
  • curl -X POST -H "Accept: application/json" -H "Content-type: text/plain" --data "This is a positive sentence because I like sentences. This is a negative sentence because I hate sentences. I like animals. I hate hats." http://localhost:8080/enhancer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published