public class TwitterJSONDocument extends Object implements Document
Modifier and Type | Field and Description |
---|---|
protected static TermPipelineAccessor |
tpa
TermPipeline processing
|
Constructor and Description |
---|
TwitterJSONDocument(com.google.gson.JsonObject json) |
TwitterJSONDocument(String JSONTweet) |
TwitterJSONDocument(String JSONTweet,
boolean saveAll) |
Modifier and Type | Method and Description |
---|---|
void |
addProperty(String propertyName,
String propertyValue)
Add a specific property to the properties for this document.
|
protected int |
byteLength(String t) |
void |
doParsing(com.google.gson.JsonObject json) |
boolean |
endOfDocument()
Returns true when the end of the document has been reached, and there
are no other terms to be retrieved from it.
|
Map<String,String> |
getAllProperties()
Returns the underlying map of all the properties defined by this Document.
|
Set<String> |
getFields()
Returns a list of the fields the current term appears in.
|
String |
getNextTerm()
Gets the next term of the document.
|
String |
getProperty(String name)
Allows access to a named property of the Document.
|
Reader |
getReader()
Returns a Reader object so client code can tokenise the document
or deal with the document itself.
|
static void |
load_pipeline()
load in the term pipeline
|
static void |
main(String[] args) |
protected static TermPipelineAccessor tpa
public TwitterJSONDocument(String JSONTweet)
public TwitterJSONDocument(String JSONTweet, boolean saveAll)
public TwitterJSONDocument(com.google.gson.JsonObject json)
public void doParsing(com.google.gson.JsonObject json)
public String getNextTerm()
Document
getNextTerm
in interface Document
public Set<String> getFields()
Document
public boolean endOfDocument()
Document
endOfDocument
in interface Document
public Reader getReader()
Document
public String getProperty(String name)
Document
getProperty
in interface Document
name
- Name of the property. It is suggested, but not required that this name
should not be case insensitive.public Map<String,String> getAllProperties()
Document
getAllProperties
in interface Document
public void addProperty(String propertyName, String propertyValue)
propertyName
- propertyValue
- protected int byteLength(String t)
public static void load_pipeline()
public static void main(String[] args)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow