Salience.GetDocumentDetails

<< Salience.AddSectionFromFile | Back to Salience 6 .Net Index | Salience.GetSummary >>

Summary

Returns an object containing various pieces of information about the document. This includes statistical information such as the number of words and sentences, as well as analytical information such as term frequency counts.
The id parameter is an optional parameter to specify which configuration to return results for. Content can be processed by multiple configurations in one pass by prior calls to Salience.AddSalienceConfiguration. Omitting this parameter or passing an empty string returns results based on the default configuration.
This method is a a wrapper around the underlying C API method lxaGetDocumentDetails.

Syntax

public SalienceDocumentDetails GetDocumentDetails(String id="")

Parameters

id Optional: The identifier for a specific configuration for results.

Returns

If successful, a SalienceDocumentDetails object is returned. Otherwise, an exception is thrown with information about the failure.

Example

    Salience Engine = null;
    string licensePath = "C:/Program Files/Lexalytics/License.v5";
    string dataPath = "C:/Program Files/Lexalytics/data";

    try
    {
        Engine = new Salience(licensePath, dataPath);
    }
    catch (SalienceException e)
    {
        System.Console.WriteLine("Error Loading SalienceEngine: " + e.Message);
        return;
    }

    int nRet = Engine.PrepareText("Lexalytics is headquartered in Amherst, MA");
    if (nRet==0)
    {
        SalienceDocumentDetails myDetails = Engine.GetDocumentDetails(String.Empty);
        ....
    }

<< Salience.AddSectionFromFile | Back to Salience 6 .Net Index | Salience.GetSummary >>