libsent/src/ngram/ngram_lookup.c File Reference

Look up N-gram entries from its name string. More...

#include <sent/stddefs.h>
#include <sent/ngram2.h>
#include <sent/ptree.h>

Go to the source code of this file.

Functions

void ngram_make_lookup_tree (NGRAM_INFO *ndata)
 Make index tree for searching N-gram ID from the entry name.
WORD_ID ngram_lookup_word (NGRAM_INFO *ndata, char *wordstr)
 Look up N-gram ID by entry name.
WORD_ID make_ngram_ref (NGRAM_INFO *ndata, char *wstr)
 Return N-gram ID of entry name, or unknown class ID if not found.


Detailed Description

Look up N-gram entries from its name string.

Author:
Akinobu LEE
Date:
Wed Feb 16 16:42:38 2005
Revision
1.1.1.1

Definition in file ngram_lookup.c.


Function Documentation

void ngram_make_lookup_tree ( NGRAM_INFO ndata  ) 

Make index tree for searching N-gram ID from the entry name.

Parameters:
ndata [in] N-gram data

Definition at line 35 of file ngram_lookup.c.

Referenced by ngram_read_bin().

WORD_ID ngram_lookup_word ( NGRAM_INFO ndata,
char *  wordstr 
)

Look up N-gram ID by entry name.

Parameters:
ndata [in] N-gram data
wordstr [in] entry name to search
Returns:
the found class/word ID, or WORD_INVALID if not found.

Definition at line 65 of file ngram_lookup.c.

Referenced by add_bigram(), add_unigram(), make_ngram_ref(), set_ngram(), and set_unknown_id().

WORD_ID make_ngram_ref ( NGRAM_INFO ndata,
char *  wstr 
)

Return N-gram ID of entry name, or unknown class ID if not found.

Parameters:
ndata [in] N-gram data
wstr [in] entry name to search
Returns:
the found class/word ID, or unknown ID if not found.

Definition at line 85 of file ngram_lookup.c.

Referenced by make_voca_ref().


Generated on Tue Dec 18 16:01:40 2007 for Julius by  doxygen 1.5.4