IDOL Server Operations > Binary Categories > Binary Category Example

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.
action=BinaryCatCreate&Name=spam_binarycat
2.
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.
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>