|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.Lexicon<java.lang.String> org.terrier.structures.MapLexicon org.terrier.structures.FSOMapFileLexicon
public class FSOMapFileLexicon
Instance of a Lexicon where a FSOrderedMapFile is always used as a backing store.
Index Properties:
Nested Class Summary | |
---|---|
static class |
FSOMapFileLexicon.MapFileLexiconEntryIterator
Iterate through the values in order |
static class |
FSOMapFileLexicon.MapFileLexiconIterator
An iterator over the lexicon |
Nested classes/interfaces inherited from class org.terrier.structures.MapLexicon |
---|
MapLexicon.Id2EntryIndexLookup, MapLexicon.IdIsIndex |
Field Summary |
---|
Fields inherited from class org.terrier.structures.MapLexicon |
---|
keyFactory |
Constructor Summary | |
---|---|
FSOMapFileLexicon(java.lang.String structureName,
Index index)
Construct a new FSOMapFileLexicon |
|
FSOMapFileLexicon(java.lang.String structureName,
java.lang.String path,
java.lang.String prefix,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
FixedSizeWriteableFactory<LexiconEntry> _valueFactory,
java.lang.String termIdLookup,
java.lang.String termLookup,
java.lang.String dataFile)
Construct an instance of the class with |
Method Summary | |
---|---|
void |
close()
|
static java.lang.String |
constructFilename(java.lang.String structureName,
java.lang.String path,
java.lang.String prefix,
java.lang.String extension)
Constructs a filename |
static void |
deleteMapFileLexicon(java.lang.String structureName,
java.lang.String path,
java.lang.String prefix)
Delete a FSOMapFileLexicon within the specified index location |
java.util.Iterator<java.util.Map.Entry<java.lang.String,LexiconEntry>> |
iterator()
|
static void |
optimise(java.lang.String structureName,
Index index,
LexiconBuilder.CollectionStatisticsCounter statsCounter)
Does two things to a FSOMapFileLexicon: adds the termid lookup file (if required), and also creates the lexicon has file. |
static void |
optimise(java.lang.String structureName,
Index index,
LexiconBuilder.CollectionStatisticsCounter statsCounter,
int numEntries)
optimise |
static void |
renameMapFileLexicon(java.lang.String SrcStructureName,
java.lang.String SrcPath,
java.lang.String SrcPrefix,
java.lang.String destStructureName,
java.lang.String destPath,
java.lang.String destPrefix)
Rename a FSOMapFileLexicon within the specified index location |
Methods inherited from class org.terrier.structures.MapLexicon |
---|
getIthLexiconEntry, getLexiconEntry, getLexiconEntry, numberOfEntries, setTermIdLookup |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSOMapFileLexicon(java.lang.String structureName, Index index) throws java.io.IOException
java.io.IOException
public FSOMapFileLexicon(java.lang.String structureName, java.lang.String path, java.lang.String prefix, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, FixedSizeWriteableFactory<LexiconEntry> _valueFactory, java.lang.String termIdLookup, java.lang.String termLookup, java.lang.String dataFile) throws java.io.IOException
structureName
- path
- prefix
- _keyFactory
- _valueFactory
- termIdLookup
- termLookup
- dataFile
-
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
MapLexicon
close
in interface java.io.Closeable
close
in class MapLexicon
java.io.IOException
public java.util.Iterator<java.util.Map.Entry<java.lang.String,LexiconEntry>> iterator()
public static void optimise(java.lang.String structureName, Index index, LexiconBuilder.CollectionStatisticsCounter statsCounter) throws java.io.IOException
structureName
- - name of the index structure that this FSOMapFileLexicon representsindex
- - the index that the index belongs
java.io.IOException
- if an IO problem occurspublic static void optimise(java.lang.String structureName, Index index, LexiconBuilder.CollectionStatisticsCounter statsCounter, int numEntries) throws java.io.IOException
structureName
- index
- statsCounter
- numEntries
-
java.io.IOException
public static java.lang.String constructFilename(java.lang.String structureName, java.lang.String path, java.lang.String prefix, java.lang.String extension)
structureName
- path
- prefix
- extension
-
public static void renameMapFileLexicon(java.lang.String SrcStructureName, java.lang.String SrcPath, java.lang.String SrcPrefix, java.lang.String destStructureName, java.lang.String destPath, java.lang.String destPrefix)
public static void deleteMapFileLexicon(java.lang.String structureName, java.lang.String path, java.lang.String prefix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |