searchSentiments

This method performs an ontology-based search of sentiments composed of a sentiment word and a domain word. Please, refer to "Sentiment Parts" for details.

Subject domain detection is also performed.

Input parameters

Tag Description
apiKey Your API key
text The text for processing. It can be a plan text or html. OpenDover removes html tags from the text before processing.

Output

Tag Description
domainRanks The tag represents a subject domain, to which the input text is related. The tag contains nested tags and may appear several times in the output. Please, check  detectSubjectDomain for details.
domainWords The tag represents a word or a short phrase from the input text  which OpenDover uses to determine subject domains. The tag contains nested tags and may appear several times in the output. Please, check  detectSubjectDomain for details.
sentiments The tag represents a sentiment found by OpenDover in the input text.  It may appear several times in the output, one time per the found sentiment. The tag contains nested tags.
sentiments/ domainCodes The value means the code of the subject domain, to which the sentiment is related. The sentiment may be related to more than one subject domain at the same time. So this tag may appear several times per one sentiment in the output.
sentiments/ domainWords The tag represents a domain word which accompanies the sentiment in the text. Typically there is only one domain word per sentiment. The tag contains nested tags length, offset and cleanText which refer to the input text (see Input Text Reference for details).
sentiments/ sentimentForce The value means the force of the sentiment. It is an integer number in range between -9 and +9. Negative value between -1 and -9 means negative sentiment. Positive number between +1 and +9 means positive sentiment.
sentiments/ sentimentType A valid sentiment type value is one of the following: JUDGEMENT, APPRECIATION, EMOTIONAL_STATE.
sentiments/ sentimentWord The content of this tag represents a piece of the input text which is recognized as a sentiment word by OpenDover. The tag contains nested tags length, offset and cleanText which refer to the input text (see Input Text Reference for details).

Request Sample

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stub="stubs.api.opendover.byelex.nl">
   <soapenv:Header/>
   <soapenv:Body>
      <stub:searchSentiments>
         <apiKey>abcdefg0123456789abcdefg</apiKey>
         <text>Nevertheless, the GadgetY's lens is perfect. 
         The colours and exposure are very good too.</text>
      </stub:searchSentiments>
   </soapenv:Body>
</soapenv:Envelope>

Response Sample

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:searchSentimentsResponse xmlns:ns2="stubs.api.opendover.byelex.nl">
         <return>
            <domainRanks>
               <domainCode>product.camera</domainCode>
               <rank>2</rank>
            </domainRanks>
            <domainWords>
               <domainCodes>product.camera</domainCodes>
               <domainWord>
                  <cleanText>lens</cleanText>
                  <length>4</length>
                  <offset>28</offset>
               </domainWord>
            </domainWords>
            <domainWords>
               <domainCodes>product.camera</domainCodes>
               <domainWord>
                  <cleanText>exposure</cleanText>
                  <length>8</length>
                  <offset>62</offset>
               </domainWord>
            </domainWords>
            <sentiments>
               <domainCodes>product.camera</domainCodes>
               <domainWords>
                  <cleanText>lens</cleanText>
                  <length>4</length>
                  <offset>28</offset>
               </domainWords>
               <sentimentForce>8</sentimentForce>
               <sentimentType>APPRECIATION</sentimentType>
               <sentimentWord>
                  <cleanText>perfect</cleanText>
                  <length>7</length>
                  <offset>36</offset>
               </sentimentWord>
            </sentiments>
            <sentiments>
               <domainCodes>product.camera</domainCodes>
               <domainWords>
                  <cleanText>exposure</cleanText>
                  <length>8</length>
                  <offset>62</offset>
               </domainWords>
               <sentimentForce>4</sentimentForce>
               <sentimentType>APPRECIATION</sentimentType>
               <sentimentWord>
                  <cleanText>very good</cleanText>
                  <length>9</length>
                  <offset>75</offset>
               </sentimentWord>
            </sentiments>
         </return>
      </ns2:searchSentimentsResponse>
   </S:Body>
</S:Envelope>