sapt Namespace Reference


Namespaces

namespace  tsa
namespace  ttrack

Classes

class  TokenIndex
class  compWords
struct  ContextForQuery
class  Bitext
class  snt_adder< L2R_Token< SimpleWordId > >
class  pstats2pplist
class  jstats
struct  PhraseExtractionRecord
struct  pstats
class  CandidateSorter
class  BitextSampler
class  ConllBottomUpToken
class  Conll_Record
class  SimpleWordId
class  L2R_Token
class  R2L_Token
class  DTNode
class  DependencyTree
class  Conll_Lemma
class  Conll_Sform
class  Conll_MajPos
class  Conll_MinPos
class  Conll_MinPos_Lemma
class  Conll_AllFields
class  Conll_WildCard
class  imBitext
class  TsaSorter
class  imTSA
class  imTtrack
class  LexicalPhraseScorer2
class  mm2dTable
class  mmBitext
class  mmTSA
class  mmTtrack
class  PhrasePair
class  SamplingBias
class  DocumentBias
class  SentenceBias
class  SamplingBiasAlways
class  TSA
class  BitSetCache
class  TSA_tree_iterator
class  Ttrack
class  PhraseScorer
class  SingleRealValuedParameterPhraseScorerFamily
class  PScoreCoherence
class  PScoreCumBias
class  PScoreLengthRatio
class  PScoreLex1
class  PScoreLogCnt
class  PScorePbwd
class  PScorePfwd
class  PScorePC
class  PScoreProvenance
class  PScoreRareness
class  PScoreUnaligned
class  PScoreWC

Typedefs

typedef ttrack::Position TokenPosition
typedef Moses::LRModel LRModel
typedef
Moses::LRModel::ReorderingType 
PhraseOrientation
typedef boost::dynamic_bitset
< uint64_t > 
bdBitset
typedef boost::dynamic_bitset
< uint64_t > 
bitvector
typedef std::vector
< std::vector< float > > 
flt_2d_table
typedef std::vector< flt_2d_tableflt_3d_table
typedef std::vector< flt_3d_tableflt_4d_table
typedef std::vector
< std::vector< ushort > > 
ushort_2d_table
typedef std::vector
< ushort_2d_table
ushort_3d_table
typedef std::vector
< ushort_3d_table
ushort_4d_table
typedef std::vector
< std::vector< short > > 
short_2d_table
typedef std::vector
< short_2d_table
short_3d_table
typedef std::vector
< short_3d_table
short_4d_table
typedef std::vector
< std::vector< int > > 
int_2d_table
typedef std::vector< int_2d_tableint_3d_table
typedef std::vector< int_3d_tableint_4d_table
typedef tpt::id_type id_type
typedef tpt::uchar uchar
typedef tpt::filepos_type filepos_type

Enumerations

enum  sampling_method { full_coverage, random_sampling, ranked_sampling, ranked_sampling2 }

Functions

void write_tokenindex_to_disk (vector< pair< string, uint32_t > > const &tok, string const &ofile, string const &unkToken)
void write_tokenindex_to_disk (std::vector< std::pair< std::string, uint32_t > > const &tok, std::string const &ofile, std::string const &unkToken)
template<class MYMAP >
void mkTokenIndex (std::string ofile, MYMAP const &M, std::string unkToken)
template<typename Token >
void fill_token_seq (TokenIndex &V, std::string const &line, std::vector< Token > &dest)
float lbop (size_t const tries, size_t const succ, float const confidence)
bool expand_phrase_pair (std::vector< std::vector< ushort > > &a1, std::vector< std::vector< ushort > > &a2, ushort const s2, ushort const L1, ushort const R1, ushort &s1, ushort &e1, ushort &e2)
void print_amatrix (std::vector< std::vector< ushort > > a1, uint32_t len2, ushort b1, ushort e1, ushort b2, ushort e2)
void write_bitvector (bitvector const &v, std::ostream &out)
template<typename Token >
void expand (typename Bitext< Token >::iter const &m, Bitext< Token > const &bt, pstats const &ps, std::vector< PhrasePair< Token > > &dest, std::ostream *log)
template<typename T >
T const * as (Conll_Record const *p)
template<typename T >
T const * up (T const *p, int length=1)
void fixParse (Conll_Record *start, Conll_Record *stop)
bool isCoherent (Conll_Record const *const start, Conll_Record const *const stop)
template<typename T >
void fill_L2R_roots (T const *start, T const *stop, std::vector< T const * > &v)
template<typename T >
T const * findInternalRoot (T const *start, T const *stop)
template<typename T >
T const * findExternalRoot (T const *start, T const *stop)
template<typename T >
T const * findInternalRoot (std::vector< T > const &v)
template<typename T >
T const * topNode (T const *start, T const *stop)
template<typename TOKEN >
boost::shared_ptr< imTtrack
< TOKEN > > 
append (typename boost::shared_ptr< imTtrack< TOKEN > > const &crp, std::vector< TOKEN > const &snt)
template<typename TOKEN >
boost::shared_ptr< imTtrack
< TOKEN > > 
append (boost::shared_ptr< imTtrack< TOKEN > > const &crp, std::vector< TOKEN > const &snt)
 add a sentence to the database
bool check (vector< ushort > const &v, size_t const LFT, size_t const RGT, ushort &L, ushort &R, size_t &count)
int expand_block (vector< vector< ushort > > const &row2col, vector< vector< ushort > > const &col2row, size_t row, size_t col, size_t const TOP, size_t const LFT, size_t const BOT, size_t const RGT, ushort *top=NULL, ushort *lft=NULL, ushort *bot=NULL, ushort *rgt=NULL)
 return number of alignment points in box, -1 on failure
sapt::PhraseOrientation find_po_fwd (vector< vector< ushort > > &a1, vector< vector< ushort > > &a2, size_t s1, size_t e1, size_t s2, size_t e2)
PhraseOrientation find_po_bwd (vector< vector< ushort > > &a1, vector< vector< ushort > > &a2, size_t s1, size_t e1, size_t s2, size_t e2)
PhraseOrientation find_po_fwd (std::vector< std::vector< ushort > > &a1, std::vector< std::vector< ushort > > &a2, size_t b1, size_t e1, size_t b2, size_t e2)
PhraseOrientation find_po_bwd (std::vector< std::vector< ushort > > &a1, std::vector< std::vector< ushort > > &a2, size_t b1, size_t e1, size_t b2, size_t e2)
template<typename OFFSET , typename ID , typename VAL , typename INIT , typename ICONT >
void write_mm_2d_table (std::ostream &out, std::vector< ICONT > const &T, std::vector< VAL > const *m1=NULL, std::vector< VAL > const *m2=NULL)
void fill_lr_vec2 (LRModel::ModelType mdl, float const *const cnt, float const total, float *v)
std::string query_bias_server (std::string const &server, std::string const &context, std::ostream *log)
template<typename TKN >
TKN const * next (TKN const *x)
template<typename T >
void display (T const *x, std::string label)
size_t len_from_pid (uint64_t pid)
template<typename sid_t , typename off_t , typename len_t >
void parse_pid (uint64_t const pid, sid_t &sid, off_t &off, len_t &len)
template<typename Token >
std::string toString (TokenIndex const &V, Token const *x, size_t const len)

Variables

LRModel::ReorderingType po_other = LRModel::NONE

Typedef Documentation

typedef boost::dynamic_bitset<uint64_t> sapt::bdBitset

Definition at line 27 of file ug_ttrack_base.h.

typedef boost::dynamic_bitset<uint64_t> sapt::bitvector

Definition at line 13 of file ug_typedefs.h.

Definition at line 33 of file ug_typedefs.h.

typedef std::vector<std::vector<float> > sapt::flt_2d_table

Definition at line 15 of file ug_typedefs.h.

typedef std::vector<flt_2d_table> sapt::flt_3d_table

Definition at line 16 of file ug_typedefs.h.

typedef std::vector<flt_3d_table> sapt::flt_4d_table

Definition at line 17 of file ug_typedefs.h.

Definition at line 31 of file ug_typedefs.h.

typedef std::vector<std::vector<int> > sapt::int_2d_table

Definition at line 27 of file ug_typedefs.h.

typedef std::vector<int_2d_table> sapt::int_3d_table

Definition at line 28 of file ug_typedefs.h.

typedef std::vector<int_3d_table> sapt::int_4d_table

Definition at line 29 of file ug_typedefs.h.

Definition at line 35 of file ug_lexical_reordering.h.

Definition at line 36 of file ug_lexical_reordering.h.

typedef std::vector<std::vector<short> > sapt::short_2d_table

Definition at line 23 of file ug_typedefs.h.

typedef std::vector<short_2d_table> sapt::short_3d_table

Definition at line 24 of file ug_typedefs.h.

typedef std::vector<short_3d_table> sapt::short_4d_table

Definition at line 25 of file ug_typedefs.h.

Definition at line 32 of file ug_bitext_sampler.h.

Definition at line 32 of file ug_typedefs.h.

typedef std::vector<std::vector<ushort> > sapt::ushort_2d_table

Definition at line 19 of file ug_typedefs.h.

typedef std::vector<ushort_2d_table> sapt::ushort_3d_table

Definition at line 20 of file ug_typedefs.h.

typedef std::vector<ushort_3d_table> sapt::ushort_4d_table

Definition at line 21 of file ug_typedefs.h.


Enumeration Type Documentation

Enumerator:
full_coverage 
random_sampling 
ranked_sampling 
ranked_sampling2 

Definition at line 23 of file ug_bitext_sampler.h.


Function Documentation

template<typename TOKEN >
boost::shared_ptr<imTtrack<TOKEN> > sapt::append ( boost::shared_ptr< imTtrack< TOKEN > > const &  crp,
std::vector< TOKEN > const &  snt 
) [inline]

add a sentence to the database

Definition at line 198 of file ug_im_ttrack.h.

References IMTTRACK_INCREMENT_SIZE, and NULL.

template<typename TOKEN >
boost::shared_ptr<imTtrack<TOKEN> > sapt::append ( typename boost::shared_ptr< imTtrack< TOKEN > > const &  crp,
std::vector< TOKEN > const &  snt 
) [inline]

Referenced by sapt::imBitext< TKN >::add(), and sapt::snt_adder< L2R_Token< SimpleWordId > >::operator()().

Here is the caller graph for this function:

template<typename T >
T const* sapt::as ( Conll_Record const *  p  )  [inline]

Definition at line 54 of file ug_conll_record.h.

References T.

Referenced by MosesTuning::NgramCounts::NgramComparator::operator()().

Here is the caller graph for this function:

bool sapt::check ( vector< ushort > const &  v,
size_t const   LFT,
size_t const   RGT,
ushort &  L,
ushort &  R,
size_t &  count 
)

Definition at line 13 of file ug_lexical_reordering.cc.

Referenced by expand_block(), sapt::mmTSA< TOKEN >::getCounts(), sapt::imTSA< TOKEN >::getCounts(), and sapt::TSA< TKN >::sntCnt().

Here is the caller graph for this function:

template<typename T >
void sapt::display ( T const *  x,
std::string  label 
) [inline]

Definition at line 21 of file ug_tsa_tree_iterator.h.

References next().

Here is the call graph for this function:

template<typename Token >
void sapt::expand ( typename Bitext< Token >::iter const &  m,
Bitext< Token > const &  bt,
pstats const &  ps,
std::vector< PhrasePair< Token > > &  dest,
std::ostream *  log 
) [inline]

Definition at line 1295 of file ug_bitext.h.

Referenced by Moses::Mmsapt::GetTargetPhraseCollectionLEGACY(), main(), and show().

Here is the caller graph for this function:

int sapt::expand_block ( vector< vector< ushort > > const &  row2col,
vector< vector< ushort > > const &  col2row,
size_t  row,
size_t  col,
size_t const   TOP,
size_t const   LFT,
size_t const   BOT,
size_t const   RGT,
ushort *  top = NULL,
ushort *  lft = NULL,
ushort *  bot = NULL,
ushort *  rgt = NULL 
)

return number of alignment points in box, -1 on failure

Definition at line 26 of file ug_lexical_reordering.cc.

References check(), T, and UTIL_THROW_IF2.

Referenced by find_po_bwd(), and find_po_fwd().

Here is the call graph for this function:

Here is the caller graph for this function:

bool sapt::expand_phrase_pair ( std::vector< std::vector< ushort > > &  a1,
std::vector< std::vector< ushort > > &  a2,
ushort const   s2,
ushort const   L1,
ushort const   R1,
ushort &  s1,
ushort &  e1,
ushort &  e2 
)

Definition at line 49 of file ug_bitext.cc.

template<typename T >
void sapt::fill_L2R_roots ( T const *  start,
T const *  stop,
std::vector< T const * > &  v 
) [inline]

Definition at line 26 of file ug_deptree.h.

References NULL, and T.

void sapt::fill_lr_vec2 ( LRModel::ModelType  mdl,
float const *const   cnt,
float const   total,
float *  v 
)

template<typename Token >
void sapt::fill_token_seq ( TokenIndex &  V,
std::string const &  line,
std::vector< Token > &  dest 
) [inline]

Definition at line 170 of file tpt_tokenindex.h.

Referenced by add_file(), main(), read_input(), and show_pair().

Here is the caller graph for this function:

PhraseOrientation sapt::find_po_bwd ( std::vector< std::vector< ushort > > &  a1,
std::vector< std::vector< ushort > > &  a2,
size_t  b1,
size_t  e1,
size_t  b2,
size_t  e2 
)

PhraseOrientation sapt::find_po_bwd ( vector< vector< ushort > > &  a1,
vector< vector< ushort > > &  a2,
size_t  s1,
size_t  e1,
size_t  s2,
size_t  e2 
)

Definition at line 115 of file ug_lexical_reordering.cc.

References Moses::LRModel::DL, Moses::LRModel::DR, expand_block(), Moses::LRModel::M, po_other, Moses::LRModel::S, and T.

Here is the call graph for this function:

PhraseOrientation sapt::find_po_fwd ( std::vector< std::vector< ushort > > &  a1,
std::vector< std::vector< ushort > > &  a2,
size_t  b1,
size_t  e1,
size_t  b2,
size_t  e2 
)

sapt::PhraseOrientation sapt::find_po_fwd ( vector< vector< ushort > > &  a1,
vector< vector< ushort > > &  a2,
size_t  s1,
size_t  e1,
size_t  s2,
size_t  e2 
)

Definition at line 88 of file ug_lexical_reordering.cc.

References Moses::LRModel::DL, Moses::LRModel::DR, expand_block(), Moses::LRModel::M, Moses::LRModel::NONE, Moses::LRModel::S, and T.

Here is the call graph for this function:

template<typename T >
T const* sapt::findExternalRoot ( T const *  start,
T const *  stop 
) [inline]

Definition at line 73 of file ug_deptree.h.

References n, NULL, and T.

template<typename T >
T const* sapt::findInternalRoot ( std::vector< T > const &  v  )  [inline]

Definition at line 97 of file ug_deptree.h.

References NULL, and T.

template<typename T >
T const* sapt::findInternalRoot ( T const *  start,
T const *  stop 
) [inline]

Definition at line 52 of file ug_deptree.h.

References n, NULL, and T.

void sapt::fixParse ( Conll_Record *  start,
Conll_Record *  stop 
)

Definition at line 314 of file ug_deptree.cc.

References sapt::Conll_Record::parent.

bool sapt::isCoherent ( Conll_Record const *const   start,
Conll_Record const *const   stop 
)

Returns:
true if the linear sequence of /Conll_Record/s is coherent, i.e., a proper connected tree structure

Definition at line 298 of file ug_deptree.cc.

References n.

float sapt::lbop ( size_t const   tries,
size_t const   succ,
float const   confidence 
)

Definition at line 11 of file ug_bitext.cc.

Referenced by stats::npmi(), sapt::PScorePfwd< Token >::operator()(), sapt::PScorePbwd< Token >::operator()(), and stats::pmi().

Here is the caller graph for this function:

size_t sapt::len_from_pid ( uint64_t  pid  ) 

Definition at line 41 of file ug_ttrack_base.cc.

Referenced by sapt::PScoreLengthRatio< Token >::operator()().

Here is the caller graph for this function:

template<class MYMAP >
void sapt::mkTokenIndex ( std::string  ofile,
MYMAP const &  M,
std::string  unkToken 
) [inline]

Definition at line 140 of file tpt_tokenindex.h.

References m, sort(), and write_tokenindex_to_disk().

Here is the call graph for this function:

template<typename TKN >
TKN const* sapt::next ( TKN const *  x  )  [inline]

template<typename sid_t , typename off_t , typename len_t >
void sapt::parse_pid ( uint64_t const   pid,
sid_t &  sid,
off_t &  off,
len_t &  len 
) [inline]

Definition at line 34 of file ug_ttrack_base.h.

void sapt::print_amatrix ( std::vector< std::vector< ushort > >  a1,
uint32_t  len2,
ushort  b1,
ushort  e1,
ushort  b2,
ushort  e2 
)

Definition at line 132 of file ug_bitext.cc.

References k.

std::string sapt::query_bias_server ( std::string const &  server,
std::string const &  context,
std::ostream *  log 
)

Definition at line 19 of file ug_sampling_bias.cc.

References Moses::http_client::content(), Moses::http_client::error_msg(), and Moses::uri_encode().

Referenced by sapt::DocumentBias::DocumentBias().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
T const* sapt::topNode ( T const *  start,
T const *  stop 
) [inline]

Returns:
the root node of the tree covering the span [start,stop), if the span is coherent; NULL otherwise

Definition at line 200 of file ug_deptree.h.

References n, NULL, and T.

Referenced by AlignedSentenceSyntax::XMLParse().

Here is the caller graph for this function:

template<typename Token >
std::string sapt::toString ( TokenIndex const &  V,
Token const *  x,
size_t const   len 
) [inline]

Definition at line 46 of file ug_ttrack_base.h.

References HERE, sapt::L2R_Token< T >::next(), and UTIL_THROW_IF2.

Referenced by TERCPPNS_TERCpp::terCalc::findBestShift(), main(), sapt::PhrasePair< Token >::print(), show(), and trymatch3().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename T >
T const* sapt::up ( T const *  p,
int  length = 1 
) [inline]

void sapt::write_bitvector ( bitvector const &  v,
std::ostream &  out 
)

Definition at line 162 of file ug_bitext.cc.

template<typename OFFSET , typename ID , typename VAL , typename INIT , typename ICONT >
void sapt::write_mm_2d_table ( std::ostream &  out,
std::vector< ICONT > const &  T,
std::vector< VAL > const *  m1 = NULL,
std::vector< VAL > const *  m2 = NULL 
) [inline]

Definition at line 158 of file ug_mm_2d_table.h.

References sapt::mm2dTable< OFFSET, ID, VAL, INIT >::Cell::id, index, INIT, tpt::numwrite(), and sapt::mm2dTable< OFFSET, ID, VAL, INIT >::Cell::val.

Here is the call graph for this function:

void sapt::write_tokenindex_to_disk ( std::vector< std::pair< std::string, uint32_t > > const &  tok,
std::string const &  ofile,
std::string const &  unkToken 
)

void sapt::write_tokenindex_to_disk ( vector< pair< string, uint32_t > > const &  tok,
string const &  ofile,
string const &  unkToken 
)

Definition at line 343 of file tpt_tokenindex.cc.

References index.

Referenced by mkTokenIndex(), and write_tokenindex().

Here is the caller graph for this function:


Variable Documentation

Definition at line 7 of file ug_lexical_reordering.cc.

Referenced by find_po_bwd().


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