Skip to content

Instantly share code, notes, and snippets.

@VJ310
VJ310 / sentenceDetector.pig
Created April 24, 2013 06:23
Sentence Boundary Detection using Pig + Java UDF + OpenNLP
register 'opennlp-tools-1.5.1-incubating.jar';
register 'opennlp-maxent-3.0.1-incubating.jar';
register 'SentimentUDF-1.0-SNAPSHOT.jar';
define getSentences com.Sentiment.udfSentence();
--load reviews from json file
raw_review = LOAD 'review.json' USING JsonLoader('votes:(funny:int,useful:int,cool:int),user_id:chararray,review_id:chararray,stars:int,date:chararray,text:chararray,type:chararray,business_id:chararray');
--seperate sentences from given review text using java UDF
@virasak
virasak / SQLiteDialect.java
Created January 29, 2009 07:26
SQLite dialect for Hibernate
/*
* The author disclaims copyright to this source code. In place of
* a legal notice, here is a blessing:
*
* May you do good and not evil.
* May you find forgiveness for yourself and forgive others.
* May you share freely, never taking more than you give.
*
*/
package org.hibernate.dialect;