sapt::mmTtrack< TKN > Class Template Reference

#include <ug_mm_ttrack.h>

Inheritance diagram for sapt::mmTtrack< TKN >:

Inheritance graph
[legend]
Collaboration diagram for sapt::mmTtrack< TKN >:

Collaboration graph
[legend]

List of all members.

Public Types

typedef TKN Token

Public Member Functions

 mmTtrack (std::string fname)
 mmTtrack ()
Token const * sntStart (size_t sid) const
Token const * sntEnd (size_t sid) const
size_t size () const
size_t numTokens () const
void open (std::string fname)
void write_blank_file_header (std::ostream &out) const
void write_index_and_finalize (std::ostream &out, std::vector< id_type > const &idx, count_type tokenCount) const
id_type copySentences (std::ostream &trg, id_type start, id_type stop) const
id_type findSid (TKN const *t) const
id_type findSid (id_type tokenOffset) const
void remap (std::string const fname, std::vector< id_type const * > const &f) const
 re-assign ids based on the id maps in /f/


Detailed Description

template<typename TKN = id_type>
class sapt::mmTtrack< TKN >

Definition at line 32 of file ug_mm_ttrack.h.


Member Typedef Documentation

template<typename TKN = id_type>
typedef TKN sapt::mmTtrack< TKN >::Token

Reimplemented from sapt::Ttrack< TKN >.

Definition at line 35 of file ug_mm_ttrack.h.


Constructor & Destructor Documentation

template<typename TKN >
sapt::mmTtrack< TKN >::mmTtrack ( std::string  fname  )  [inline]

Definition at line 160 of file ug_mm_ttrack.h.

References sapt::mmTtrack< TKN >::open().

Here is the call graph for this function:

template<typename TKN >
sapt::mmTtrack< TKN >::mmTtrack (  )  [inline]

Definition at line 151 of file ug_mm_ttrack.h.

References NULL.


Member Function Documentation

template<typename TKN >
id_type sapt::mmTtrack< TKN >::copySentences ( std::ostream &  trg,
id_type  start,
id_type  stop 
) const [inline]

Definition at line 242 of file ug_mm_ttrack.h.

References sapt::mmTtrack< TKN >::sntEnd(), and sapt::mmTtrack< TKN >::sntStart().

Here is the call graph for this function:

template<typename TKN >
id_type sapt::mmTtrack< TKN >::findSid ( id_type  tokenOffset  )  const [inline]

Definition at line 205 of file ug_mm_ttrack.h.

template<typename TKN >
id_type sapt::mmTtrack< TKN >::findSid ( TKN const *  t  )  const [inline, virtual]

find the sentence id of a given token

Implements sapt::Ttrack< TKN >.

Definition at line 194 of file ug_mm_ttrack.h.

template<typename TKN >
size_t sapt::mmTtrack< TKN >::numTokens (  )  const [inline, virtual]

Returns:
size of corpus in number of words/tokens

Implements sapt::Ttrack< TKN >.

Definition at line 120 of file ug_mm_ttrack.h.

template<typename TKN >
void sapt::mmTtrack< TKN >::open ( std::string  fname  )  [inline]

Definition at line 168 of file ug_mm_ttrack.h.

References tpt::numread().

Referenced by main(), sapt::mmTtrack< TKN >::mmTtrack(), sapt::mmBitext< TKN >::open(), and sapt::imBitext< TKN >::open().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename TKN >
void sapt::mmTtrack< TKN >::remap ( std::string const   fname,
std::vector< id_type const * > const &  f 
) const [inline]

re-assign ids based on the id maps in /f/

Definition at line 91 of file ug_mm_ttrack.h.

References tpt::numread(), and Moses::prime().

Here is the call graph for this function:

template<typename TKN >
size_t sapt::mmTtrack< TKN >::size (  )  const [inline, virtual]

Returns:
size of corpus in number of sentences

Implements sapt::Ttrack< TKN >.

Definition at line 112 of file ug_mm_ttrack.h.

Referenced by main(), and Counter::operator()().

Here is the caller graph for this function:

template<typename TKN >
TKN const * sapt::mmTtrack< TKN >::sntEnd ( size_t  sid  )  const [inline, virtual]

Returns:
end point of sentence /sid/

Implements sapt::Ttrack< TKN >.

Definition at line 143 of file ug_mm_ttrack.h.

References index, and sid.

Referenced by check_range(), sapt::mmTtrack< TKN >::copySentences(), main(), printRangeMAM(), printRangeMCT(), printRangeMTT(), and Counter::processSentence().

Here is the caller graph for this function:

template<typename TKN >
TKN const * sapt::mmTtrack< TKN >::sntStart ( size_t  sid  )  const [inline, virtual]

Returns:
a pointer to beginning of sentence /sid/

Implements sapt::Ttrack< TKN >.

Definition at line 128 of file ug_mm_ttrack.h.

References index, and sid.

Referenced by check_range(), sapt::mmTtrack< TKN >::copySentences(), main(), printRangeMAM(), printRangeMCT(), printRangeMTT(), and Counter::processSentence().

Here is the caller graph for this function:

template<typename TKN >
void sapt::mmTtrack< TKN >::write_blank_file_header ( std::ostream &  out  )  const [inline]

Definition at line 215 of file ug_mm_ttrack.h.

References tpt::numwrite().

Here is the call graph for this function:

template<typename TKN >
void sapt::mmTtrack< TKN >::write_index_and_finalize ( std::ostream &  out,
std::vector< id_type > const &  idx,
count_type  tokenCount 
) const [inline]

Definition at line 225 of file ug_mm_ttrack.h.

References tpt::numwrite().

Here is the call graph for this function:


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

Generated on Thu Jul 6 00:34:27 2017 for Moses by  doxygen 1.5.9