org.annolab.tt4j
Interface Model

All Known Implementing Classes:
DefaultModel

public interface Model

A TreeTagger model.

Author:
Richard Eckart de Castilho

Method Summary
 void destroy()
          Destroy transient resources for the model.
 String getEncoding()
          Get the model encoding.
 File getFile()
          Get the location of the model.
 String getFlushSequence()
          The the token sequence used to flush the TreeTagger state for the given model.
 String getName()
          Get the name of the model.
 void install()
          Install the model to the file system (if necessary).
 

Method Detail

getName

String getName()
Get the name of the model.

Returns:
the model name.

install

void install()
             throws IOException
Install the model to the file system (if necessary).

Throws:
IOException - if the model cannot be installed.

getFile

File getFile()
Get the location of the model. Unless install() is called before, the model may not actually be present at this location.

Returns:
the model location.

getEncoding

String getEncoding()
Get the model encoding.

Returns:
the model encoding.

getFlushSequence

String getFlushSequence()
The the token sequence used to flush the TreeTagger state for the given model. Usually this is a short full sentence in the language the model is trained on. The returned string needs to contain each token separated by a space including a full stop, e.g. "This is a sentence .".

Returns:
the flush sequence.

destroy

void destroy()
Destroy transient resources for the model. E.g. if the model was extracted to a temporary location from an archive/classpath, it can be deleted by this method.



Copyright © 2011. All Rights Reserved.