Moses::FName Struct Reference

#include <FeatureVector.h>

List of all members.

Public Types

typedef boost::unordered_map
< std::string, size_t > 
Name2Id
typedef boost::unordered_map
< size_t, size_t > 
Id2Count

Public Member Functions

 FName (const StringPiece &root, const StringPiece &name)
 FName (const StringPiece &name)
const std::string & name () const
size_t hash () const
bool operator== (const FName &rhs) const
bool operator!= (const FName &rhs) const

Static Public Member Functions

static size_t getId (const std::string &name)
static size_t getHopeIdCount (const std::string &name)
static size_t getFearIdCount (const std::string &name)
static void incrementHopeId (const std::string &name)
static void incrementFearId (const std::string &name)
static void eraseId (size_t id)

Static Public Attributes

static const std::string SEP = "_"
static Name2Id name2id
static std::vector< std::string > id2name
static Id2Count id2hopeCount
static Id2Count id2fearCount


Detailed Description

Feature name

Definition at line 58 of file FeatureVector.h.


Member Typedef Documentation

typedef boost::unordered_map<size_t,size_t> Moses::FName::Id2Count

Definition at line 63 of file FeatureVector.h.

typedef boost::unordered_map<std::string,size_t> Moses::FName::Name2Id

Definition at line 62 of file FeatureVector.h.


Constructor & Destructor Documentation

Moses::FName::FName ( const StringPiece root,
const StringPiece name 
) [inline]

Definition at line 73 of file FeatureVector.h.

References StringPiece::data(), SEP, and StringPiece::size().

Here is the call graph for this function:

Moses::FName::FName ( const StringPiece name  )  [inline, explicit]

Definition at line 79 of file FeatureVector.h.


Member Function Documentation

void Moses::FName::eraseId ( size_t  id  )  [static]

static size_t Moses::FName::getFearIdCount ( const std::string &  name  )  [static]

Referenced by Moses::FVector::printSparseFearFeatureCounts(), and Moses::FVector::pruneSparseFeatures().

Here is the caller graph for this function:

static size_t Moses::FName::getHopeIdCount ( const std::string &  name  )  [static]

Referenced by Moses::FVector::printSparseHopeFeatureCounts(), and Moses::FVector::pruneSparseFeatures().

Here is the caller graph for this function:

static size_t Moses::FName::getId ( const std::string &  name  )  [static]

size_t Moses::FName::hash (  )  const

Definition at line 144 of file FeatureVector.cpp.

References Moses::hash_value().

Referenced by Moses::FNameHash::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

static void Moses::FName::incrementFearId ( const std::string &  name  )  [static]

Referenced by Moses::FVector::incrementSparseFearFeatures().

Here is the caller graph for this function:

static void Moses::FName::incrementHopeId ( const std::string &  name  )  [static]

Referenced by Moses::FVector::incrementSparseHopeFeatures().

Here is the caller graph for this function:

const std::string & Moses::FName::name (  )  const

Definition at line 149 of file FeatureVector.cpp.

References id2name.

Referenced by Moses::operator<<().

Here is the caller graph for this function:

bool Moses::FName::operator!= ( const FName rhs  )  const

Definition at line 160 of file FeatureVector.cpp.

bool Moses::FName::operator== ( const FName rhs  )  const

Definition at line 155 of file FeatureVector.cpp.


Member Data Documentation

Definition at line 68 of file FeatureVector.h.

Referenced by eraseId().

Definition at line 67 of file FeatureVector.h.

Referenced by eraseId().

vector< string > Moses::FName::id2name [static]

Definition at line 66 of file FeatureVector.h.

Referenced by name().

Definition at line 65 of file FeatureVector.h.

const string Moses::FName::SEP = "_" [static]


The documentation for this struct was generated from the following files:

Generated on Thu Jul 6 00:32:59 2017 for Moses by  doxygen 1.5.9