# proto/Source/ngrams.h File Reference

Interface declaration of structure designed to keep all instances of NGram(s). More...

`#include "config.h"`
`#include "hash_vector.h"`
`#include <vector>`
`#include <utility>`
`#include "ngram.h"`
`#include "pool.h"`

## Namespaces
namespace | ace
## Classes
class | ace::NGramHashCounter
| Class provides hashing function for N-grams instances. More...
struct | ace::NGramHasher
| Functor, which wraps hashing function (NGramHashCounter::count_hash()). More...
class | ace::NGramStore
| Class serves as NGram(s) store. More...
struct | ace::NGramFrequencies
| Struct holds table of all *-frequencies of certain N-gram. More...
class | ace::NGramsProcessor
| NGramsProcessor simplifies gathering of frequency stats of given N-gram (and all its downcasted types) from NGramStore container. More...
## Typedefs
typedef std::vector< frequency_t > | ace::freq_table_t
| Container for frequency statistics.

## Detailed Description

Interface declaration of structure designed to keep all instances of NGram(s).

NGram(s) data are saved inside memory pool(s). The use of hashing container(s) gains us the quick access to stored instances. The stored NGram instances are kept unique within the program scope.

Note: Because hash_set container, which is used below is not standardized, there are some differences between implementations founded in Visual Studio (based on Dinkumware library) and GCC (based on SGI library). The main difference is in comparison function. Dinkumware lib compares stored items by < operator, while SGI lib uses == operator. Therefore there are some differences in code handed to VS and to GCC (precompiler directives are used to handle this).

(C) Ceslav Przywara 2008, MFF UK Prague