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 NGramFrequenciesngram_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

Reference to NGramStore to be processed.

Iterator to the next item to be processed.

Iterator to the end of store.

Recently gathered frequencies of certain N-gram.


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

Generated on Wed Aug 6 23:25:51 2008 for PACE by  doxygen 1.5.6