public final class DictionaryUtil
extends java.lang.Object
FST
を使った辞書を構築/参照するメソッドを持っている。修飾子とタイプ | クラスと説明 |
---|---|
static class |
DictionaryUtil.ConstantLongValueDictionaryEntry
固定long値を持つ
DictionaryUtil.LongValueDictionaryEntry の実装クラス。 |
static class |
DictionaryUtil.ConstantLongValueDictionaryEntryFactory
|
static interface |
DictionaryUtil.DictionaryEntry |
static interface |
DictionaryUtil.DictionaryEntryFactory |
static class |
DictionaryUtil.EndOffsetPositiveInt |
static class |
DictionaryUtil.LongValueDicEntriesComparator |
static interface |
DictionaryUtil.LongValueDictionaryEntry |
static interface |
DictionaryUtil.LongValueDictionaryEntryFactory |
コンストラクタと説明 |
---|
DictionaryUtil() |
修飾子とタイプ | メソッドと説明 |
---|---|
static <E extends DictionaryUtil.LongValueDictionaryEntry> |
buildFST(java.util.List<E> dicEntries,
java.util.Comparator<E> comparator) |
static FST<java.lang.Object> |
buildFST(java.util.Set<CharsRef> keys) |
static <E extends DictionaryUtil.DictionaryEntry> |
compareStrings(E o1,
E o2) |
static int |
getLongestMatchEndOffset(FST.BytesReader fstReader,
FST<java.lang.Object> fst,
FST.Arc<java.lang.Object> scratchArc,
boolean ignoreCase,
char[] src,
int start) |
static DictionaryUtil.EndOffsetPositiveInt |
getLongestMatchEndOffsetPositiveInt(FST.BytesReader fstReader,
TokenInfoFST fst,
FST.Arc<java.lang.Long> scratchArc,
PositiveIntOutputs outputs,
boolean ignoreCase,
char[] src,
int start) |
static FST.Arc<java.lang.Object> |
getScratchArc() |
static java.lang.String[] |
parseMapLine(java.lang.String line)
"src => dest" という形式のレコードを読み取る。
|
static java.util.Map<java.lang.String,java.lang.String> |
readMaps(java.io.Reader in,
boolean ignoreCase) |
static java.util.Set<CharsRef> |
readWords(java.io.Reader in,
boolean ignoreCase) |
static java.util.Set<DictionaryUtil.DictionaryEntry> |
readWords(java.io.Reader in,
boolean ignoreCase,
DictionaryUtil.DictionaryEntryFactory factory) |
public static java.util.Set<CharsRef> readWords(java.io.Reader in, boolean ignoreCase) throws java.io.IOException
java.io.IOException
public static java.util.Set<DictionaryUtil.DictionaryEntry> readWords(java.io.Reader in, boolean ignoreCase, DictionaryUtil.DictionaryEntryFactory factory) throws java.io.IOException
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.String> readMaps(java.io.Reader in, boolean ignoreCase) throws java.io.IOException
java.io.IOException
public static java.lang.String[] parseMapLine(java.lang.String line)
line
- public static <E extends DictionaryUtil.DictionaryEntry> int compareStrings(E o1, E o2)
public static FST<java.lang.Object> buildFST(java.util.Set<CharsRef> keys) throws java.io.IOException
java.io.IOException
public static FST.Arc<java.lang.Object> getScratchArc()
public static int getLongestMatchEndOffset(FST.BytesReader fstReader, FST<java.lang.Object> fst, FST.Arc<java.lang.Object> scratchArc, boolean ignoreCase, char[] src, int start) throws java.io.IOException
java.io.IOException
public static <E extends DictionaryUtil.LongValueDictionaryEntry> FST<java.lang.Long> buildFST(java.util.List<E> dicEntries, java.util.Comparator<E> comparator) throws java.io.IOException
java.io.IOException
public static DictionaryUtil.EndOffsetPositiveInt getLongestMatchEndOffsetPositiveInt(FST.BytesReader fstReader, TokenInfoFST fst, FST.Arc<java.lang.Long> scratchArc, PositiveIntOutputs outputs, boolean ignoreCase, char[] src, int start) throws java.io.IOException
java.io.IOException
Copyright © 2009-2018 RONDHUIT Co.,Ltd. All Rights Reserved.