ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Public Attributes | Private Attributes | List of all members
meta::index::forward_index::impl Class Reference

Implementation of a forward_index. More...

Public Member Functions

 impl (forward_index *idx)
 Constructs an implementation based on a forward_index.
 
void load_index ()
 This function loads a disk index from its filesystem representation.
 
void create_index (const std::string &config_file)
 This function initializes the forward index. More...
 
void init_metadata ()
 Initializes this index's metadata structures.
 
void create_libsvm_postings (const cpptoml::table &config)
 
void create_libsvm_metadata ()
 Initializes structures based on a libsvm-formatted file.
 
void uninvert (const inverted_index &inv_idx)
 
void create_uninverted_metadata (const std::string &name)
 
bool is_libsvm_format (const cpptoml::table &config) const
 
void set_doc_byte_locations ()
 Calculates which documents start at which bytes in the postings file.
 
void compressed_postings_to_libsvm (uint64_t num_docs)
 Converts postings.index into a libsvm formatted file. More...
 

Public Attributes

uint64_t total_unique_terms_
 the total number of unique terms if term_id_mapping_ is unused
 
util::optional< util::disk_vector< uint64_t > > doc_byte_locations_
 doc_id -> postings file byte location
 

Private Attributes

forward_indexidx_
 Pointer to the forward_index this is an implementation of.
 

Detailed Description

Implementation of a forward_index.

Member Function Documentation

void meta::index::forward_index::impl::create_index ( const std::string &  config_file)

This function initializes the forward index.

Parameters
config_fileThe configuration file used to create the index
void meta::index::forward_index::impl::create_libsvm_postings ( const cpptoml::table &  config)
Parameters
configthe configuration settings for this index
void meta::index::forward_index::impl::uninvert ( const inverted_index inv_idx)
Parameters
inv_idxThe inverted index to uninvert
void meta::index::forward_index::impl::create_uninverted_metadata ( const std::string &  name)
Parameters
nameThe name of the inverted index to copy data from
bool meta::index::forward_index::impl::is_libsvm_format ( const cpptoml::table &  config) const
Parameters
configthe configuration settings for this index
Returns
whether this index will be based off of a single libsvm-formatted corpus file
void meta::index::forward_index::impl::compressed_postings_to_libsvm ( uint64_t  num_docs)

Converts postings.index into a libsvm formatted file.

Parameters
num_docsThe total number of documents

The documentation for this class was generated from the following file: