|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpt.tumba.ngram.ProfileReader
public class ProfileReader
Class to hold (static) methods to read in profile data.
A Profile stores N-gram frequency information for a given textual string.
| Field Summary | |
|---|---|
private static ProfileReader |
_theInstance
The single instance of this Singleton class. |
| Constructor Summary | |
|---|---|
private |
ProfileReader()
Sole constructor of ProfileReader. |
| Method Summary | |
|---|---|
static ProfileReader |
getInstance()
Returns an instance of this class. |
protected static java.util.Map |
newNGram(java.util.Map count,
byte[] ba,
int start,
int len)
Create a new N-gram from an array of bytes. |
static java.util.List |
read(java.io.InputStream stream)
Read an N-gram profile from an InputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final ProfileReader _theInstance
| Constructor Detail |
|---|
private ProfileReader()
| Method Detail |
|---|
public static ProfileReader getInstance()
ProfileReader.
protected static java.util.Map newNGram(java.util.Map count,
byte[] ba,
int start,
int len)
count - A Map with N-gram frequency information.ba - An array of bytes with the chars corresponding to this N-Gram.start - Starting position in the array of bytes.len - Length in the array of bytes.
public static java.util.List read(java.io.InputStream stream)
throws java.io.IOException
InputStream.
stream - The InputStream from where to read the Profile.
List with the N-Grams in the profile.
java.io.IOException - A problem occurred while reading from the InputStream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||