# ace::NGramsProcessor Class Reference

NGramsProcessor simplifies gathering of frequency stats of given N-gram (and all its downcasted types) from NGramStore container. More...

`#include <ngrams.h>`

List of all members.

## Public Member Functions
| NGramsProcessor (NGramStore &ngrams)
| Pass n-gram store to n-grams processor to retrieve all *-frequencies.
bool | next (void)
| Counts values of frequency table for next N-gram.
const NGramFrequencies & | ngram_frequencies (void) const
| Frequencies object is returned by reference, so it stays valid till the following next() call.
## Private Attributes
const NGramStore & | _ngram_store
| Reference to NGramStore to be processed.
NGramStore::hash_table_t::const_iterator | _next
| Iterator to the next item to be processed.
NGramStore::hash_table_t::const_iterator | _end
| Iterator to the end of store.
NGramFrequencies | _ngram_frequencies
| Recently gathered frequencies of certain N-gram.

## Detailed Description

NGramsProcessor simplifies gathering of frequency stats of given N-gram (and all its downcasted types) from NGramStore container.

## Constructor & Destructor Documentation

ace::NGramsProcessor::NGramsProcessor | ( | NGramStore & | ngrams | ) | `[inline]`

Pass n-gram store to n-grams processor to retrieve all *-frequencies.

Parameters:

  | ngrams | N-gram store.

## Member Function Documentation

bool ace::NGramsProcessor::next | ( | void |  | ) |

Counts values of frequency table for next N-gram.

Returns:
  True, if there has been N-gram to process, otherwise return false.

const NGramFrequencies& ace::NGramsProcessor::ngram_frequencies | ( | void |  | ) | const`[inline]`

Frequencies object is returned by reference, so it stays valid till the following next() call.

Returns:
  Last processed N-gram frequencies.

## Member Data Documentation

const NGramStore& ace::NGramsProcessor::_ngram_store`[private]`

Reference to NGramStore to be processed.

NGramStore::hash_table_t::const_iterator ace::NGramsProcessor::_next`[private]`

Iterator to the next item to be processed.

NGramStore::hash_table_t::const_iterator ace::NGramsProcessor::_end`[private]`

Iterator to the end of store.

NGramFrequencies ace::NGramsProcessor::_ngram_frequencies`[private]`

Recently gathered frequencies of certain N-gram.

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

- proto/Source/ngrams.h
- proto/Source/ngrams.cpp