lxaPrepareText

<< lxaRemoveSalienceConfiguration | Back to Salience 6 C API Index | lxaPrepareTextFromFile >>

Summary

Prepares a piece of text for processing. This function, or its sister function lxaPrepareTextFromFile, must be called every time you want to process a different piece of text. Text should either be 7bit ASCII or UTF8.

Syntax

int lxaPrepareText(SalienceSession *pSession, const char *acText);

Parameters

pSession Pointer to a SalienceSession structure previously returned by a call to lxaOpenSalienceSession
acText Pointer to a char* buffer

Returns

This function returns an integer return code.
LXA_OK Text preparation was successful
LXA_OK_WITH_WARNINGS The text is malformed in some way. You should call lxaGetLastWarnings to find out the specifics of the warning.

Notes

Words that exceed 366 characters in length will be truncated. This is twice the length of the longest English word which is not a chemical compound.
Sentences that exceed 1000 words will cause lxaPrepareText to return with LXA_ERROR.

Example

     char* acBuffer = "This is some text to process";
     ...
     SalienceSession* pSession;
     if(lxaOpenSalienceSession(oLicense, &oStartup, &pSession) != LXA_OK)
          return 1;
     lxaPrepareText(pSession,acBuffer);
     ...

<< lxaRemoveSalienceConfiguration | Back to Salience 6 C API Index | lxaPrepareTextFromFile >>