it.unimi.dsi.mg4j.util
Class ImmutableExternalTriePrefixDictionary
java.lang.Object
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectList<CharSequence>
it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary
it.unimi.dsi.mg4j.util.ImmutableExternalTriePrefixDictionary
- All Implemented Interfaces:
- ObjectCollection<CharSequence>, ObjectIterable<CharSequence>, ObjectList<CharSequence>, Stack<CharSequence>, PrefixMap, TermMap, Serializable, Comparable<List<? extends CharSequence>>, Iterable<CharSequence>, Collection<CharSequence>, List<CharSequence>
Deprecated. Moved to dsiutils
.
@Deprecated
public class ImmutableExternalTriePrefixDictionary
- extends ImmutableExternalPrefixDictionary
- implements Serializable
An ImmutableExternalPrefixDictionary
that compresses words using
a HuTuckerCodec
and approximates
intervals using an ImmutableTriePrefixTree
that uses the same codec.
- Since:
- 0.9.3
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
Methods inherited from class it.unimi.dsi.mg4j.util.ImmutableExternalPrefixDictionary |
contains, get, getIndex, getInterval, getNumber, getPrefix, getPrefix, getTerm, getTerm, hasPrefixes, hasTerms, indexOf, iterator, lastIndexOf, main, setDumpStream, setDumpStream, size |
Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList |
add, add, addAll, addAll, addElements, addElements, compareTo, contains, ensureIndex, ensureRestrictedIndex, equals, getElements, hashCode, listIterator, listIterator, objectListIterator, objectListIterator, objectSubList, peek, pop, push, remove, removeElements, set, size, subList, top, toString |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
serialVersionUID
public static final long serialVersionUID
- Deprecated.
- See Also:
- Constant Field Values
ImmutableExternalTriePrefixDictionary
public ImmutableExternalTriePrefixDictionary(Iterable<? extends CharSequence> terms)
throws IOException
- Deprecated.
- Throws:
IOException
ImmutableExternalTriePrefixDictionary
public ImmutableExternalTriePrefixDictionary(Iterable<? extends CharSequence> terms,
CharSequence dumpFile)
throws IOException
- Deprecated.
- Throws:
IOException
ImmutableExternalTriePrefixDictionary
public ImmutableExternalTriePrefixDictionary(Iterable<? extends CharSequence> terms,
int blockSizeInBytes)
throws IOException
- Deprecated.
- Throws:
IOException
ImmutableExternalTriePrefixDictionary
public ImmutableExternalTriePrefixDictionary(Iterable<? extends CharSequence> terms,
int blockSizeInBytes,
CharSequence dumpStreamFilename)
throws IOException
- Deprecated.
- Throws:
IOException
getPrefixCodec
protected PrefixCodec getPrefixCodec(int[] frequency)
- Deprecated.
- Description copied from class:
ImmutableExternalPrefixDictionary
- An abstract factory method returning a prefix codec that will be used to compress the dump file.
Implementing subclasses must provide a codec. The coder will be used
at construction time, and will be passed to ImmutableExternalPrefixDictionary.getIntervalApproximator(List, PrefixCoder)
,
whereas the decoder will be available in ImmutableExternalPrefixDictionary.decoder
.
- Specified by:
getPrefixCodec
in class ImmutableExternalPrefixDictionary
- Parameters:
frequency
- the symbol frequencies.
- Returns:
- the prefix codec that will be used to compress the dump file.
getIntervalApproximator
protected ImmutableExternalPrefixDictionary.IntervalApproximator getIntervalApproximator(List<? extends CharSequence> delimiters,
PrefixCoder prefixCoder)
- Deprecated.
- Description copied from class:
ImmutableExternalPrefixDictionary
- An abstract factory method returning an interval approximator for this external dictionary.
- Specified by:
getIntervalApproximator
in class ImmutableExternalPrefixDictionary
- Parameters:
delimiters
- a list of the words appearing at the start of each block.prefixCoder
- the prefix coder provided by the prefix coded previously returned by ImmutableExternalPrefixDictionary.getPrefixCodec(int[])
;
the returned approximator can use its coder/decoder.
- Returns:
- an interval approximator for this external dictionary.