Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View nihanthd's full-sized avatar
🏠
Working from home

Nihanth Dara nihanthd

🏠
Working from home
  • Hulu
  • Los Angeles
View GitHub Profile
@nihanthd
nihanthd / Attribute
Created November 3, 2015 04:52
Code to parse and pre-process the JSON file
public class Attributes {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new FileReader(args[0]));
String line = "";
JsonParser jsonParser = new JsonParser();
BufferedWriter output =
new BufferedWriter(new FileWriter(new File(args[1])));
HashSet<String> ratings = new HashSet<String>();
while((line = br.readLine()) != null){
JsonElement json = jsonParser.parse(line);