Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

moot::mootNgrams Class Reference

Class for storage & retrieval of raw N-Gram frequencies.

#include <mootNgrams.h>

List of all members.

Public Types

Public Methods

Public Attributes


Member Typedef Documentation

typedef map<mootTagString,BigramEntry> moot::mootNgrams::BigramTable
 

Type for secondary lookup table

typedef CountT moot::mootNgrams::NgramCount
 

Type for an N-Gram count

typedef map<mootTagString,UnigramEntry> moot::mootNgrams::NgramTable
 

Type for primary lookup-table

typedef map<mootTagString,NgramCount> moot::mootNgrams::TrigramTable
 

Type for tertiary (tag->trigramCount) lookup-table entry


Constructor & Destructor Documentation

moot::mootNgrams::mootNgrams void    [inline]
 

Default constructor

moot::mootNgrams::~mootNgrams   [inline]
 

Default destructor


Member Function Documentation

void moot::mootNgrams::add_count const Ngram   ngram,
const NgramCount    count
[inline]
 

Add count to the current count for ngram -- length-dependent.

void moot::mootNgrams::add_count const mootTagString   tag1,
const mootTagString   tag2,
const mootTagString   tag3,
const NgramCount    count
[inline]
 

Add count to the current count for trigram <tag1,tag2,tag3> Does NOT add any bigram or unigram counts.

void moot::mootNgrams::add_count const mootTagString   tag1,
const mootTagString   tag2,
const NgramCount    count
[inline]
 

Add count to the current count for bigram <tag1,tag2> Does NOT add any unigram counts.

void moot::mootNgrams::add_count const mootTagString   tag,
const NgramCount    count
[inline]
 

Add count to the current count for unigram <tag>.

void moot::mootNgrams::add_counts const Ngram   ngram,
const NgramCount    count
[inline]
 

Add count to the current count for <tag1>, <tag1,tag2>, and <tag1,tag2,tag3> in ngram.... ngram may be shorter than 3 tags, in which case counts are only added for the elements present.

void moot::mootNgrams::clear void    [inline]
 

Clear the ngrams object

bool moot::mootNgrams::load FILE *    file,
const char *    filename = ((void *) 0)
 

Load n-grams from a TnT-style parameter file (stream version)

bool moot::mootNgrams::load const char *    filename
 

Load n-grams from a TnT-style parameter file

const NgramCount moot::mootNgrams::lookup const mootTagString   tag1,
const mootTagString   tag2,
const mootTagString   tag3
const [inline]
 

Returns current count for trigram <tag1,tag2,tag3>, returns 0 if unknown

const NgramCount moot::mootNgrams::lookup const mootTagString   tag1,
const mootTagString   tag2
const [inline]
 

Returns current count for bigram <tag1,tag2>, returns 0 if unknown

const NgramCount moot::mootNgrams::lookup const mootTagString   tag const [inline]
 

Returns current count for unigram, returns 0 if unknown

size_t moot::mootNgrams::n_bigrams void   
 

Return the number of distinct stored bigrams

size_t moot::mootNgrams::n_trigrams void   
 

Return the number of distinct stored trigrams

bool moot::mootNgrams::save FILE *    file,
const char *    filename = ((void *) 0),
bool    compact = false
 

Save n-grams to a TnT-style paramater file (stream version)

bool moot::mootNgrams::save const char *    filename,
bool    compact = false
 

Save n-grams to a TnT-style paramater file


Member Data Documentation

NgramTable moot::mootNgrams::ngtable
 

N-Gram to count lookup table

NgramCount moot::mootNgrams::ugtotal
 

total number of unigrams


The documentation for this class was generated from the following file:
Generated on Wed Jul 28 15:48:06 2004 for libmoot by doxygen1.2.15