Brevity Document Summarizer Toolkit
Main Functions Types Errors Demos Home

brSummarizeBuffer

Summarizes the text in a buffer. The text must be null terminated. You should strip all formatting in your text otherwise Brevity may be unable to determine what is a word from what is formatting text. To get the generated summary call either brGetSummary or brGetOffsets.

Synopsis

void brSummarizeBuffer( SumManagerT Summarizer, char *buffer, StatusCodeT *Status )

Arguments

 Summarizer The Brevity summarizer object returned by brCreateSummarizer.
 buffer A pointer to a null terminated buffer of text.
 Status A pointer to a value of type StatusCodeT. If an error occurs during the execution of the function a value representing the error will be stored in *Status. You should check *Status after every function call.

Returns

Nothing.

Related Functions

None.

Example

// We assume you've already created a Brevity summarizer object

// named Brevity and specified a dictionary.

 

char *databuffer;



// Create a buffer approximately 32K in size

databuffer = (char *) malloc( sizeof(char) * 32000 );



if ( databuffer == NULL ) {

   printerror( eNoMemory );  // some constant for our error function 

   return;

}



// A function you write that puts your text into the buffer

GetText( databuffer );



ixSummarizeBuffer( Brevity, databuffer, &Status );



if ( *Status < 0 ) {

   printerror( Status );

   return; // error

}



// Code for getting the summary and printing it goes here

 

Previous Main Next Home

Copyright 2000 Lextek International