net.java.sen.dictionary
Class DictionaryUtil
java.lang.Object
net.java.sen.dictionary.DictionaryUtil
public class DictionaryUtil
- extends Object
encoding methods for packing the POS file (mostly from Lucene)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DictionaryUtil
public DictionaryUtil()
readVInt
public static int readVInt(ByteBuffer bb)
- Reads an int stored in variable-length format. Reads between one and
five bytes. Smaller values take fewer bytes. Negative numbers are not
supported.
- See Also:
DataOutput#writeVInt(int)
writeVInt
public static void writeVInt(DataOutput d,
int i)
throws IOException
- Writes an int in a variable-length format. Writes between one and
five bytes. Smaller values take fewer bytes. Negative numbers are not
supported.
- Throws:
IOException- See Also:
DataInput#readVInt()
writeKatakana
public static void writeKatakana(DataOutput d,
String s)
throws IOException
- Throws:
IOException
readString
public static void readString(ByteBuffer b,
char[] s,
int off,
int len)
readKatakana
public static void readKatakana(ByteBuffer b,
char[] s,
int off,
int len)
Copyright © 2012. All Rights Reserved.