@@ -0,0 +1,1825 @@
+package org.lemurproject.galago.contrib.parse;%0A%0Aimport org.lemurproject.galago.core.parse.Document;%0Aimport org.lemurproject.galago.core.parse.DocumentStreamParser;%0Aimport org.lemurproject.galago.core.types.DocumentSplit;%0Aimport org.lemurproject.galago.utility.Parameters;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0A%0A/**%0A * Simple %7B@link DocumentStreamParser%7D to consume the Signal Media Dataset from the NewsIR'16 workshop.%0A * Add --filetype=org.lemurproject.galago.contrib.parse.SignalMediaJSONParser to your command line.%0A * Also add --tokenizer/field=title to your %22galago build%22 command if you want to index the title field.%0A * @author jfoley%0A */%0Apublic class SignalMediaJSONParser extends DocumentStreamParser %7B%0A  private final BufferedReader reader;%0A%0A  /**%0A   * This is the constructor expected by UniversalParser%0A   * It must be implemented in each implementing class%0A   *%0A   * @param split%0A   * @param p%0A   */%0A  public SignalMediaJSONParser(DocumentSplit split, Parameters p) throws IOException %7B%0A    super(split, p);%0A    this.reader = DocumentStreamParser.getBufferedReader(split);%0A  %7D%0A%0A  @Override%0A  public Document nextDocument() throws IOException %7B%0A    String line = reader.readLine();%0A    if(line == null) return null;%0A%0A    Document doc = new Document();%0A    Parameters jdoc = Parameters.parseString(line);%0A    doc.metadata.put(%22source%22, jdoc.getString(%22source%22));%0A    doc.metadata.put(%22title%22, jdoc.getString(%22title%22));%0A    doc.metadata.put(%22media-type%22, jdoc.getString(%22media-type%22)); // News or Blog%0A    doc.metadata.put(%22published%22, jdoc.getString(%22published%22));%0A%0A    doc.name = jdoc.getString(%22id%22);%0A    doc.text = %22%3Ctitle%3E%22+jdoc.getString(%22title%22)+%22%3C/title%3E%22+jdoc.getString(%22content%22);%0A    return doc;%0A  %7D%0A%0A  @Override%0A  public void close() throws IOException %7B%0A    reader.close();%0A  %7D%0A%7D%0A

Add parser for NewsIR JSON document collection.