DESCRIPTION

This class opens extracts, both from files and from strings, so that the user will be able to get extract information quickly and easily.

MEAD::Extract should do much the same stuff as this class.


METHODS

$extract = DUC::Extract->open_from_file($filename);
Opens an extract from the specified file.

$extract = DUC::Extract->parse_from_string($extract_string);
Opens and returns an extract from the argument string, which is an extract in XML format.

$num = $extract->get_num_sentences();
Returns the number of sentences in this Extract. Sentences are numbered from 1 to $num. Calling any of the remaining methods with an argument less than 1 or greater than the value returned by this method will result in unpredictable behavior.

$docid = $extract->get_DOCID_for_sentence($sentence_index);
Returns the document ID (docid/DOCID) for the specified sentence in the extract. This ID is the ID for the document from which the specified sentence was extracted.

$did = $extract->get_DID_for_sentence($sentence_index);
An alias for get_DOCID_for_sentence($sentence_index).

$sno = $extract->get_SNO_for_sentence($sentence_index);
Returns the sentence number of the specified sentence IN THE CORRESPONDING SOURCE DOCUMENT.

$wcnt = $extract->get_WCNT_for_sentence($sentence_index);
Returns the number of words of the specified sentence in the extract.

$text = $extract->get_text();
Returns the text of the extract, with two spaces spaces between sentences.