sapt::Ttrack< TKN > Class Template Reference

#include <ug_ttrack_base.h>

Inheritance diagram for sapt::Ttrack< TKN >:

Inheritance graph
[legend]

List of all members.

Public Types

typedef ttrack::Position Position
typedef TKN Token

Public Member Functions

virtual ~Ttrack ()
virtual TKN const * sntStart (size_t sid) const =0
virtual TKN const * sntEnd (size_t sid) const =0
TKN const * getToken (Position const &p) const
template<typename T >
T const * getTokenAs (Position const &p) const
template<typename T >
T const * sntStartAs (id_type sid) const
template<typename T >
T const * sntEndAs (id_type sid) const
size_t sntLen (size_t sid) const
size_t startPos (id_type sid) const
size_t endPos (id_type sid) const
std::vector< TKN > operator[] (id_type sid) const
virtual size_t size () const =0
virtual size_t numTokens () const =0
std::string str (id_type sid, TokenIndex const &T) const
std::string pid2str (TokenIndex const *V, uint64_t pid) const
count_type count_tokens (std::vector< count_type > &cnt, bdBitset const *filter, int lengthCutoff=0, std::ostream *log=NULL) const
int cmp (Position const &A, Position const &B, int keyLength) const
int cmp (Position const &A, TKN const *keyStart, int keyLength=-1, int depth=0) const
virtual id_type findSid (TKN const *t) const =0
TKN const * find_next_within_sentence (TKN const *startKey, int keyLength, Position startHere) const
Position find_first (TKN const *startKey, int keyLength, bdBitset const *filter=NULL) const
Position find_next (TKN const *startKey, int keyLength, Position startAfter, bdBitset const *filter=NULL) const
virtual size_t offset (TKN const *t) const
template<>
string str (id_type sid, TokenIndex const &T) const


Detailed Description

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

Definition at line 60 of file ug_ttrack_base.h.


Member Typedef Documentation

template<typename TKN = id_type>
typedef ttrack::Position sapt::Ttrack< TKN >::Position

Definition at line 64 of file ug_ttrack_base.h.

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

Reimplemented in sapt::mmTtrack< TKN >.

Definition at line 66 of file ug_ttrack_base.h.


Constructor & Destructor Documentation

template<typename TKN = id_type>
virtual sapt::Ttrack< TKN >::~Ttrack (  )  [inline, virtual]

Definition at line 64 of file ug_ttrack_base.h.


Member Function Documentation

template<typename TKN>
int sapt::Ttrack< TKN >::cmp ( Position const &  A,
TKN const *  keyStart,
int  keyLength = -1,
int  depth = 0 
) const [inline]

Definition at line 275 of file ug_ttrack_base.h.

References sapt::Ttrack< TKN >::getToken(), and sapt::ttrack::Position::sid.

Here is the call graph for this function:

template<typename TKN >
int sapt::Ttrack< TKN >::cmp ( Position const &  A,
Position const &  B,
int  keyLength 
) const [inline]

Definition at line 233 of file ug_ttrack_base.h.

References sapt::next(), and sapt::ttrack::Position::sid.

Here is the call graph for this function:

template<typename TKN >
count_type sapt::Ttrack< TKN >::count_tokens ( std::vector< count_type > &  cnt,
bdBitset const *  filter,
int  lengthCutoff = 0,
std::ostream *  log = NULL 
) const [inline]

Returns:
string representation of sentence /sid/ Currently only defined for Ttrack<id_type> counts the tokens in the corpus; used for example in the construction of token sequence arrays

Definition at line 177 of file ug_ttrack_base.h.

References k, sid, sapt::Ttrack< TKN >::size(), sapt::Ttrack< TKN >::sntEnd(), sapt::Ttrack< TKN >::sntLen(), sapt::Ttrack< TKN >::sntStart(), stop, and totalCount.

Here is the call graph for this function:

template<typename TKN = id_type>
size_t sapt::Ttrack< TKN >::endPos ( id_type  sid  )  const [inline]

Definition at line 103 of file ug_ttrack_base.h.

template<typename TKN>
Ttrack< TKN >::Position sapt::Ttrack< TKN >::find_first ( TKN const *  startKey,
int  keyLength,
bdBitset const *  filter = NULL 
) const [inline]

Definition at line 332 of file ug_ttrack_base.h.

References sapt::Ttrack< TKN >::find_next_within_sentence(), sid, sapt::Ttrack< TKN >::size(), and sapt::Ttrack< TKN >::sntStart().

Here is the call graph for this function:

template<typename TKN>
Ttrack< TKN >::Position sapt::Ttrack< TKN >::find_next ( TKN const *  startKey,
int  keyLength,
Position  startAfter,
bdBitset const *  filter = NULL 
) const [inline]

template<typename TKN>
TKN const * sapt::Ttrack< TKN >::find_next_within_sentence ( TKN const *  startKey,
int  keyLength,
Position  startHere 
) const [inline]

Definition at line 303 of file ug_ttrack_base.h.

References k, NULL, and sapt::ttrack::Position::offset.

Referenced by sapt::Ttrack< TKN >::find_first().

Here is the caller graph for this function:

template<typename TKN = id_type>
virtual id_type sapt::Ttrack< TKN >::findSid ( TKN const *  t  )  const [pure virtual]

template<typename TKN >
TKN const * sapt::Ttrack< TKN >::getToken ( Position const &  p  )  const [inline]

Definition at line 166 of file ug_ttrack_base.h.

References NULL, sapt::ttrack::Position::offset, and sapt::ttrack::Position::sid.

Referenced by sapt::Ttrack< TKN >::cmp(), and sapt::Ttrack< Token >::getTokenAs().

Here is the caller graph for this function:

template<typename TKN = id_type>
template<typename T >
T const* sapt::Ttrack< TKN >::getTokenAs ( Position const &  p  )  const [inline]

Definition at line 83 of file ug_ttrack_base.h.

template<typename TKN = id_type>
virtual size_t sapt::Ttrack< TKN >::numTokens (  )  const [pure virtual]

Returns:
size of corpus in number of words/tokens

Implemented in sapt::imTtrack< Token >, and sapt::mmTtrack< TKN >.

Referenced by sapt::BitSetCache< TSA >::get2(), and sapt::Ttrack< TKN >::str().

Here is the caller graph for this function:

template<typename TKN = id_type>
virtual size_t sapt::Ttrack< TKN >::offset ( TKN const *  t  )  const [inline, virtual]

Definition at line 158 of file ug_ttrack_base.h.

template<typename TKN = id_type>
std::vector<TKN> sapt::Ttrack< TKN >::operator[] ( id_type  sid  )  const [inline]

Don't use this unless you want a copy of the sentence

Definition at line 107 of file ug_ttrack_base.h.

template<typename TKN >
std::string sapt::Ttrack< TKN >::pid2str ( TokenIndex const *  V,
uint64_t  pid 
) const [inline]

Definition at line 390 of file ug_ttrack_base.h.

References sid, sapt::Ttrack< TKN >::sntStart(), and stop.

Here is the call graph for this function:

template<typename TKN = id_type>
virtual size_t sapt::Ttrack< TKN >::size (  )  const [pure virtual]

Returns:
size of corpus in number of sentences

Implemented in sapt::imTtrack< Token >, and sapt::mmTtrack< TKN >.

Referenced by sapt::Ttrack< TKN >::count_tokens(), fill(), sapt::Ttrack< TKN >::find_first(), and sapt::BitSetCache< TSA >::get().

Here is the caller graph for this function:

template<typename TKN = id_type>
virtual TKN const* sapt::Ttrack< TKN >::sntEnd ( size_t  sid  )  const [pure virtual]

template<typename TKN = id_type>
template<typename T >
T const* sapt::Ttrack< TKN >::sntEndAs ( id_type  sid  )  const [inline]

Definition at line 93 of file ug_ttrack_base.h.

template<typename TKN = id_type>
size_t sapt::Ttrack< TKN >::sntLen ( size_t  sid  )  const [inline]

Returns:
length of sentence /sid/

Definition at line 97 of file ug_ttrack_base.h.

Referenced by sapt::Ttrack< TKN >::count_tokens().

Here is the caller graph for this function:

template<typename TKN = id_type>
virtual TKN const* sapt::Ttrack< TKN >::sntStart ( size_t  sid  )  const [pure virtual]

template<typename TKN = id_type>
template<typename T >
T const* sapt::Ttrack< TKN >::sntStartAs ( id_type  sid  )  const [inline]

Definition at line 88 of file ug_ttrack_base.h.

template<typename TKN = id_type>
size_t sapt::Ttrack< TKN >::startPos ( id_type  sid  )  const [inline]

Definition at line 100 of file ug_ttrack_base.h.

template<>
string sapt::Ttrack< id_type >::str ( id_type  sid,
TokenIndex const &  T 
) const [inline]

Returns:
string representation of sentence /sid/

Definition at line 28 of file ug_ttrack_base.cc.

References sapt::Ttrack< TKN >::numTokens(), sapt::Ttrack< TKN >::sntEnd(), sapt::Ttrack< TKN >::sntStart(), and stop.

Here is the call graph for this function:

template<typename TKN = id_type>
std::string sapt::Ttrack< TKN >::str ( id_type  sid,
TokenIndex const &  T 
) const

Returns:
string representation of sentence /sid/ Currently only defined for Ttrack<id_type>


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

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