Colibri Core
Public Types | List of all members
AlignedPatternMap< ValueType, ValueHandler, NestedSizeType > Class Template Reference

A nested pattern map, useful for storing patterns that map to other patterns, which in turn map to values. An example is phrase-translation tables in Machine Translation. More...

#include <patternstore.h>

Inheritance diagram for AlignedPatternMap< ValueType, ValueHandler, NestedSizeType >:
PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t > PatternMapStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern > PatternStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern > PatternStoreInterface

Public Types

typedef PatternMap< ValueType, ValueHandler, NestedSizeType > valuetype
 
typedef PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t >::iterator iterator
 
typedef PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t >::const_iterator const_iterator
 
- Public Types inherited from PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t >
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::iterator iterator
 
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::const_iterator const_iterator
 
- Public Types inherited from PatternMapStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::iterator iterator
 
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::const_iterator const_iterator
 
- Public Types inherited from PatternStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::iterator iterator
 
typedef std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >::const_iterator const_iterator
 

Additional Inherited Members

- Public Member Functions inherited from PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t >
 PatternMap ()
 
void insert (const Pattern &pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > &value)
 
void insert (const Pattern &pattern)
 
bool has (const Pattern &pattern) const
 
bool has (const PatternPointer &pattern) const
 
size_t size () const
 
void reserve (size_t s)
 
PatternMap< ValueType, ValueHandler, NestedSizeType > & operator[] (const Pattern &pattern)
 
PatternMap< ValueType, ValueHandler, NestedSizeType > & operator[] (const PatternPointer &pattern)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
iterator find (const Pattern &pattern)
 
const_iterator find (const Pattern &pattern) const
 
iterator find (const PatternPointer &pattern)
 
const_iterator find (const PatternPointer &pattern) const
 
bool erase (const Pattern &pattern)
 
iterator erase (const_iterator position)
 
- Public Member Functions inherited from PatternMapStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
 PatternMapStore ()
 
virtual ~PatternMapStore ()
 
virtual void write (std::ostream *out)
 
virtual void write (std::string filename)
 
void read (std::istream *in, int MINTOKENS=0, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true, bool DORESET=false, bool DEBUG=false)
 
void read (std::string filename, int MINTOKENS=0, int MINLENGTH=0, int MAXLENGTH=999999, PatternStoreInterface *constrainstore=NULL, bool DONGRAMS=true, bool DOSKIPGRAMS=true, bool DOFLEXGRAMS=true, bool DORESET=false, bool DEBUG=false)
 
- Public Member Functions inherited from PatternStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
 PatternStore ()
 
virtual ~PatternStore ()
 
virtual void attachcorpus (unsigned char *corpusstart, unsigned int corpussize)
 
virtual void attachcorpus (const IndexedCorpus &corpus)
 
virtual void detachcorpus ()
 
unsigned char * getcorpus () const
 
unsigned int getcorpussize () const
 
virtual void use_v1_format ()
 
virtual PatternStoreInterfacegetstoreinterface ()
 
- Protected Attributes inherited from PatternMap< PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t >
std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > > data
 
- Protected Attributes inherited from PatternMapStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, PatternMap< ValueType, ValueHandler, NestedSizeType >, PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
PatternStoreValueHandler< PatternMap< ValueType, ValueHandler, NestedSizeType > > valuehandler
 
- Protected Attributes inherited from PatternStore< std::unordered_map< Pattern, PatternMap< ValueType, ValueHandler, NestedSizeType > >, uint64_t, Pattern >
unsigned char * corpusstart
 
unsigned int corpussize
 
unsigned char classencodingversion
 
int patterntype
 

Detailed Description

template<class ValueType, class ValueHandler = BaseValueHandler<ValueType>, class NestedSizeType = uint16_t>
class AlignedPatternMap< ValueType, ValueHandler, NestedSizeType >

A nested pattern map, useful for storing patterns that map to other patterns, which in turn map to values. An example is phrase-translation tables in Machine Translation.

Member Typedef Documentation

template<class ValueType , class ValueHandler = BaseValueHandler<ValueType>, class NestedSizeType = uint16_t>
typedef PatternMap< PatternMap<ValueType,ValueHandler,NestedSizeType>,PatternStoreValueHandler<PatternMap<ValueType,ValueHandler,NestedSizeType> >, uint64_t >::const_iterator AlignedPatternMap< ValueType, ValueHandler, NestedSizeType >::const_iterator
template<class ValueType , class ValueHandler = BaseValueHandler<ValueType>, class NestedSizeType = uint16_t>
typedef PatternMap< PatternMap<ValueType,ValueHandler,NestedSizeType>,PatternStoreValueHandler<PatternMap<ValueType,ValueHandler,NestedSizeType> >, uint64_t >::iterator AlignedPatternMap< ValueType, ValueHandler, NestedSizeType >::iterator
template<class ValueType , class ValueHandler = BaseValueHandler<ValueType>, class NestedSizeType = uint16_t>
typedef PatternMap<ValueType,ValueHandler,NestedSizeType> AlignedPatternMap< ValueType, ValueHandler, NestedSizeType >::valuetype

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