<< lxaPrepareText | Back to Salience 6 C API Index | lxaAddSection >>


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


int lxaPrepareTextFromFile(SalienceSession *pSession, const char *acFile);


pSession Pointer to a SalienceSession structure previously returned by a call to lxaOpenSalienceSession
acFile Pointer to a null-terminated string containing the path to the file you want to process


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.


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 lxaPrepareTextFromFile to return with LXA_ERROR.


     char* acPath = "/path/to/content";
     SalienceSession* pSession;
     if(lxaOpenSalienceSession(oLicense, &oStartup, &pSession) != LXA_OK)
          return 1;

<< lxaPrepareText | Back to Salience 6 C API Index | lxaAddSection >>