Open topic with navigation

# Binary Category Example

This section contains a step-by-step scenario for how you might use a binary category. After the initial creation of the binary category, each step provides more than one example of possible actions.

1. Create a binary category.

       action=BinaryCatCreate&Name=spam_binarycat

2. Train the new binary category (from a selection of indexed documents, free text, and files).

       action=BinaryCatTrain&Name=spam_binarycat&PositiveDocID=123,456&NegativeDocID=789,890

       action=BinaryCatCreate&Name=spam_binarycat&PositiveTraining=Get rich quick, join today&NegativeTraining=We should discuss the Jones file

       action=BinaryCatCreate&Name=spam_binarycat&PositiveDirectory=C:\spampositive&NegativeDirectory=C:\spamnegative

3. Query some data using the binary category.

       action=BinaryCatQuery&Name=spam_binarycat&QueryFile=C:\unknown_email.txt

       action=BinaryCatQuery&Name=spam_binarycat&QueryText=Limited space available, apply today

The following sample shows a `POSITIVE` result, with a score of `0.99664` from a binary category query:

    <autnresponse xmlns:autn="'http://schemas.autonomy.com/aci/'">
        <action>
            BINARYCATQUERY
        </action>
        <response>
            SUCCESS
        </response>
        <responsedata>
            <autn:queryresult>
                <autn:result>
                    POSITIVE
                </autn:result>
                <autn:score>
                    0.99664
                </autn:score>
            <autn:queryresult>
        </responsedata>
    </autnresponse>

© 2017 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm