wordc/langc for infommapi

Post Reply
gazim
Posts: 66
Joined: Sun Feb 18, 2001 1:01 pm

wordc/langc for infommapi

Post by gazim »

I have a stand alone ATL COM interface built with infommapi(). I was wondering if there's a way I can set wordc and langc before mm processing. I would like make sure that mm is considering the same language and word bounderies that is being used for searching.
TIA.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

wordc/langc for infommapi

Post by mark »

byte *pm_getlangc(void);
byte *pm_getwordc(void);

Return pointers to the internal arrays that are of size DYNABYTE. You may then modify those arrays. Each element is 0 or 1 indicating membership in the set. eg
langc['A']==1
langc['@']==0
gazim
Posts: 66
Joined: Sun Feb 18, 2001 1:01 pm

wordc/langc for infommapi

Post by gazim »

Thank you mark. Few more questions.
1) If I had langc['-']==1 ; langc['.']; and langc['X27']==1 ; would that be identical to '[\alnum\X27 \- \.]'>?
2) Is there a way to set hyphenphrase off in metamorph in a similar way?

Thanks again. I appreciate your help.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

wordc/langc for infommapi

Post by mark »

langc['X27'] should be langc[0x27] but you probably knew that. If you want a specific set of characters it's best to assume nothing and set the whole array. Zero it out and loop over 0 thru (DYNABYTE-1) and set langc[i] to isalnum(i) then also set your extra chars.

Control hyphenphrase with
void ppmhyeqsp(int truefalse);
It takes the same values as hyphenphrase.
Post Reply