Source Code:
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
/**
* Sougou Pinyin IME SCEL File Reader
*
* SCEL Format overview:
*
* General Information:
* - Chinese characters and pinyin are all encoded with UTF-16LE.
* - Numbers are using little endian byte order.
*
* SCEL hex analysis:
* - 0x0 Pinyin List Offset
* - 0x120 total number of words
* - 0x total number of pinyin
* - ... List of pinyin as [index, byte length of pinyin, pinyin as string] triples
* - ... Dictionary
* - ...
*
* Dictionary format:
* - It can interpreted as a list of