Phrase Matcher


Data Structures

struct  PhraseDesktopData
struct  PhraseSessionData

Functions

void phrase_matcher_init (iml_desktop_t *d)
 Initialises Phrase Matcher.
void phrase_matcher_done (iml_desktop_t *d)
 Finalises Phrase Matcher.
void phrase_matcher_create_session (iml_session_t *s)
 Creates Phrase Matcher session context.
void phrase_matcher_destroy_session (iml_session_t *s)
 Destroys Phrase Matcher session context.
int phrase_matcher_search (iml_session_t *s, const UTF8CHAR *utf8)
 Search for phrases that begin with utf8.
void phrase_matcher_show_results (iml_session_t *s)
 Shows phrase match result lookup.
UTF8CHARphrase_matcher_get_result (iml_session_t *s, int row)
 Get the phrase match result on row row of current page.
void phrase_matcher_hide_results (iml_session_t *s)
 Hides the phrase match result lookup.
void phrase_matcher_next_page (iml_session_t *s)
 Turn to next page of phrase match result lookup.
void phrase_matcher_prev_page (iml_session_t *s)
 Turn to previous page of phrase match result lookup.
void phrase_matcher_add_extra_cands (iml_session_t *s, char **cands, int num_cands, int source)
 Adds an extra page of candidates to phrase match lookup.

Function Documentation

void phrase_matcher_add_extra_cands ( iml_session_t *  s,
char **  cands,
int  num_cands,
int  source 
)

Adds an extra page of candidates to phrase match lookup.

This is currently used by the Google Suggest lookup.

Parameters:
s current IMLSession
cands array of extra candidates in UTF-8
num_cands number of cands
source the source ID of the extra cands (not used -- only Google Suggest at the moment)

void phrase_matcher_create_session ( iml_session_t *  s  ) 

Creates Phrase Matcher session context.

Parameters:
s current IMLSession

void phrase_matcher_destroy_session ( iml_session_t *  s  ) 

Destroys Phrase Matcher session context.

Parameters:
s current IMLSession

void phrase_matcher_done ( iml_desktop_t *  d  ) 

Finalises Phrase Matcher.

Parameters:
d current IMLDesktop

UTF8CHAR* phrase_matcher_get_result ( iml_session_t *  s,
int  row 
)

Get the phrase match result on row row of current page.

Parameters:
s current IMLSession
row the row number of the result
Returns:
the phrase in UTF-8. The returned string is owned by Phrase Matcher and the caller must not free or modify it.

void phrase_matcher_hide_results ( iml_session_t *  s  ) 

Hides the phrase match result lookup.

Parameters:
s current IMLSession

void phrase_matcher_init ( iml_desktop_t *  d  ) 

Initialises Phrase Matcher.

Parameters:
d current IMLDesktop

void phrase_matcher_next_page ( iml_session_t *  s  ) 

Turn to next page of phrase match result lookup.

Parameters:
s current IMLSession

void phrase_matcher_prev_page ( iml_session_t *  s  ) 

Turn to previous page of phrase match result lookup.

Parameters:
s current IMLSession

int phrase_matcher_search ( iml_session_t *  s,
const UTF8CHAR utf8 
)

Search for phrases that begin with utf8.

Parameters:
s current IMLSession
utf8 key string in UTF-8
Returns:
the number of phrases matched

void phrase_matcher_show_results ( iml_session_t *  s  ) 

Shows phrase match result lookup.

Parameters:
s current IMLSession


Generated on Fri Sep 7 15:51:41 2007 for unihan-core-le by  doxygen 1.5.2