de.unihd.dbs.heideltime.standalone
public class HeidelTimeStandalone extends java.lang.Object
Constructor and Description |
---|
HeidelTimeStandalone()
empty constructor.
|
HeidelTimeStandalone(Language language,
DocumentType typeToProcess,
OutputType outputType)
constructor
|
HeidelTimeStandalone(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath)
Constructor with configPath.
|
HeidelTimeStandalone(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath,
POSTagger posTagger)
Constructor with configPath
|
HeidelTimeStandalone(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath,
POSTagger posTagger,
java.lang.Boolean doIntervalTagging)
Constructor with configPath
|
Modifier and Type | Method and Description |
---|---|
DocumentType |
getDocumentType() |
Language |
getLanguage() |
OutputType |
getOutputType() |
POSTagger |
getPosTagger() |
void |
initialize(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath)
Method that initializes all vital prerequisites
|
void |
initialize(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath,
POSTagger posTagger)
Method that initializes all vital prerequisites, including POS Tagger
|
void |
initialize(Language language,
DocumentType typeToProcess,
OutputType outputType,
java.lang.String configPath,
POSTagger posTagger,
java.lang.Boolean doIntervalTagging)
Method that initializes all vital prerequisites, including POS Tagger
|
static void |
main(java.lang.String[] args) |
java.lang.String |
process(java.lang.String document)
Processes document with HeidelTime
|
java.lang.String |
process(java.lang.String document,
java.util.Date documentCreationTime)
Processes document with HeidelTime
|
java.lang.String |
process(java.lang.String document,
java.util.Date documentCreationTime,
ResultFormatter resultFormatter)
Processes document with HeidelTime
|
java.lang.String |
process(java.lang.String document,
ResultFormatter resultFormatter)
Processes document with HeidelTime
|
static void |
readConfigFile(java.lang.String configPath) |
void |
setDocumentType(DocumentType documentType) |
void |
setLanguage(Language language) |
void |
setOutputType(OutputType outputType) |
void |
setPosTagger(POSTagger posTagger) |
public HeidelTimeStandalone()
language
- typeToProcess
- outputType
- public HeidelTimeStandalone(Language language, DocumentType typeToProcess, OutputType outputType)
language
- typeToProcess
- outputType
- public HeidelTimeStandalone(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath)
language
- typeToProcess
- outputType
- configPath
- public HeidelTimeStandalone(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath, POSTagger posTagger)
language
- typeToProcess
- outputType
- configPath
- posTagger
- public HeidelTimeStandalone(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath, POSTagger posTagger, java.lang.Boolean doIntervalTagging)
language
- typeToProcess
- outputType
- configPath
- posTagger
- public void initialize(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath)
language
- Language to be processed with this copy of HeidelTimetypeToProcess
- Domain type to be processedoutputType
- Output typeconfigPath
- Path to the configuration file for HeidelTimeStandalonepublic void initialize(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath, POSTagger posTagger)
language
- Language to be processed with this copy of HeidelTimetypeToProcess
- Domain type to be processedoutputType
- Output typeconfigPath
- Path to the configuration file for HeidelTimeStandaloneposTagger
- POS Tagger to use for preprocessingpublic void initialize(Language language, DocumentType typeToProcess, OutputType outputType, java.lang.String configPath, POSTagger posTagger, java.lang.Boolean doIntervalTagging)
language
- Language to be processed with this copy of HeidelTimetypeToProcess
- Domain type to be processedoutputType
- Output typeconfigPath
- Path to the configuration file for HeidelTimeStandaloneposTagger
- POS Tagger to use for preprocessingdoIntervalTagging
- Whether or not to invoke the IntervalTaggerpublic java.lang.String process(java.lang.String document) throws DocumentCreationTimeMissingException
document
- DocumentCreationTimeMissingException
- If document creation time is missing when processing a
document of type DocumentType.NEWS
. Use
process(String, Date)
instead to provide document
creation time!public java.lang.String process(java.lang.String document, java.util.Date documentCreationTime) throws DocumentCreationTimeMissingException
document
- DocumentCreationTimeMissingException
- If document creation time is missing when processing a
document of type DocumentType.NEWS
. Use
process(String, Date)
instead to provide document
creation time!public java.lang.String process(java.lang.String document, ResultFormatter resultFormatter) throws DocumentCreationTimeMissingException
document
- DocumentCreationTimeMissingException
- If document creation time is missing when processing a
document of type DocumentType.NEWS
. Use
process(String, Date)
instead to provide document
creation time!public java.lang.String process(java.lang.String document, java.util.Date documentCreationTime, ResultFormatter resultFormatter) throws DocumentCreationTimeMissingException
document
- documentCreationTime
- Date when document was created - especially important if
document is of type DocumentType.NEWS
DocumentCreationTimeMissingException
- If document creation time is missing when processing a
document of type DocumentType.NEWS
public static void main(java.lang.String[] args)
args
- public static void readConfigFile(java.lang.String configPath)
public DocumentType getDocumentType()
public void setDocumentType(DocumentType documentType)
public Language getLanguage()
public void setLanguage(Language language)
public OutputType getOutputType()
public void setOutputType(OutputType outputType)
public final POSTagger getPosTagger()
public final void setPosTagger(POSTagger posTagger)