Page 1 of 1
wordc/langc for infommapi
Posted: Thu Nov 11, 2004 8:21 pm
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.
wordc/langc for infommapi
Posted: Fri Nov 12, 2004 11:05 am
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
wordc/langc for infommapi
Posted: Wed Nov 17, 2004 1:20 pm
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.
wordc/langc for infommapi
Posted: Wed Nov 17, 2004 1:53 pm
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.