detectSubjectDomain

This method discovers and represents subject domains for the given text. The result is a list of domains, which are currently supported by OpenDover.

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. OpenDover can relate the text to one or several domains or fail to relate at all. So this tag may appear zero, one or more times in the output. The tag contains nested tags (see below).
domainRanks/domainCode The value is the code of the subject domain, to which the input text is related.
domainRanks/rank The value is a positive integer number. When a text is related to more than one subject domains, it helps to choose more appropriate domains out of the result list. The higher the value, the stronger is the relation.
domainWords The tag represents a piece of text (a word or a short phrase) which OpenDover uses to determine subject domains of the input text. The tag may appear zero, one or more times in the output. It contains nested tags (see below).
domainWords/domainCodes The value is the code of the subject domain, to which the domain word belongs. There can be several domainCodes tag instances inside of one domainWords tag. This means that the domain word belongs to several subject domains at the same time.
domainWords/domainWord The tag describes the location of the domain word in the input text. The tag contains nested tags (see below)
domainWords/domainWord/cleanText The value is a domain word or phrase with the removed HTML markup.
domainWords/domainWord/length The length of the domain word or phrase in the input text (including HTML markup when applicable).
domainWords/domainWord/offset The offset of the domain word or phrase in the input text.

Request Sample

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:stub="stubs.api.opendover.byelex.nl">
   <soapenv:Header/>
   <soapenv:Body>
      <stub:detectSubjectDomain>
         <apiKey>abcdefg0123456789abcdefg</apiKey>
         <text>
The Nikon Coolpix S8000 is a compact and slim 
camera that is available with a wide-angle zoom 
lens, 720p HD movie mode, as well as high-resolution LCD.
         </text>
      </stub:detectSubjectDomain>
   </soapenv:Body>
</soapenv:Envelope>

Response Sample

<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:detectSubjectDomainResponse xmlns:ns2="stubs.api.opendover.byelex.nl">
         <return>
            <domainRanks>
               <domainCode>product.camera</domainCode>
               <rank>4</rank>
            </domainRanks>
            <domainRanks>
               <domainCode>product.monitor</domainCode>
               <rank>1</rank>
            </domainRanks>
            <domainRanks>
               <domainCode>product.phone</domainCode>
               <rank>1</rank>
            </domainRanks>
            <domainWords>
               <domainCodes>product.camera</domainCodes>
               <domainWord>
                  <cleanText>camera</cleanText>
                  <length>6</length>
                  <offset>48</offset>
               </domainWord>
            </domainWords>
            <domainWords>
               <domainCodes>product.camera</domainCodes>
               <domainWord>
                  <cleanText>zoom lens</cleanText>
                  <length>10</length>
                  <offset>91</offset>
               </domainWord>
            </domainWords>
            <domainWords>
               <domainCodes>product.camera</domainCodes>
               <domainWord>
                  <cleanText>movie mode</cleanText>
                  <length>10</length>
                  <offset>111</offset>
               </domainWord>
            </domainWords>
            <domainWords>
               <domainCodes>product.phone</domainCodes>
               <domainCodes>product.camera</domainCodes>
               <domainCodes>product.monitor</domainCodes>
               <domainWord>
                  <cleanText>LCD</cleanText>
                  <length>3</length>
                  <offset>150</offset>
               </domainWord>
            </domainWords>
         </return>
      </ns2:detectSubjectDomainResponse>
   </S:Body>
</S:Envelope>