myxAIgentResponse =
myxAIgentService.GetExtraction(myxAIgentRequest)
'Run the xAIgent Service to
extract the text and return the key phrases.
Dim myResultsCounter As Integer
= 1
Me.TextBoxResults.Text = ""
If
myxAIgentResponse.KeyPhrases.Count > 0 Then
'Process each key phrase object
in the response.
Dim keyPhrase2Process As
xAIgentService.KeyPhrase
For Each keyPhrase2Process In
myxAIgentResponse.KeyPhrases
keyPhrase2Process.Phrase =
keyPhrase2Process.Phrase.ToUpper
keyPhrase2Process.Highlight =
keyPhrase2Process.Highlight.ToCharArray()
'Output the keyphrase object to
the results text box.
Me.TextBoxResults.Text =
Me.TextBoxResults.Text & myResultsCounter.ToString & ".
" & keyPhrase2Process.Phrase & vbCrLf & _
"Score: " &
keyPhrase2Process.Score.ToString & vbCrLf & _
"Highlight: " &
keyPhrase2Process.Highlight & vbCrLf & vbCrLf
myResultsCounter =
myResultsCounter + 1
Next
Else
Me.TextBoxResults.Text = "No
Results were returned."
End If
Catch ex As Exception
Me.TextBoxResults.Text =
ex.Message.ToString()
End Try
|