org.hops.common
Class RecognizedUserInput

java.lang.Object
  extended by org.hops.common.RecognizedUserInput
All Implemented Interfaces:
java.io.Serializable

public class RecognizedUserInput
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 answer_coverage coverage_result
           
 answer_expected expected_result
           
 answer_result parser_result
           
 double score
           
 java.lang.String sentence
           
 ut_status status
           
 java.lang.String xmlparser
           
 
Constructor Summary
RecognizedUserInput()
          Creates a new instance of RecognizedUserInput
 
Method Summary
 HopsAttribute addAttribute(HopsAttribute attribute)
          Adds an attribute to the RecognizedUserInput If the key exists, then replaces the old attribute with the new one.
 void addAttribute(HopsAttribute[] attributes)
          Adds a list of attributes to the RecognizedUserInput
 void clear()
          Clear the RecognizedUserInput
 HopsAttribute[] getAllAttributes()
          Returns all the attributes recognized
 HopsAttribute getAttribute(java.lang.String key)
          Returns an attribute recognized
 java.util.Collection getAttributes()
          Returns all the attributes stored
 java.util.Set getKeys()
          Returns all the keys of the attributes stored
 void removeAttribute(java.lang.String key)
          Remove the attribute ( if found )
 int size()
          Gets the size of the attributes stored in the RecognizedUserInput
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sentence

public java.lang.String sentence

score

public double score

status

public ut_status status

parser_result

public answer_result parser_result

expected_result

public answer_expected expected_result

coverage_result

public answer_coverage coverage_result

xmlparser

public java.lang.String xmlparser
Constructor Detail

RecognizedUserInput

public RecognizedUserInput()
Creates a new instance of RecognizedUserInput

Method Detail

addAttribute

public HopsAttribute addAttribute(HopsAttribute attribute)
Adds an attribute to the RecognizedUserInput If the key exists, then replaces the old attribute with the new one. If not, this is added to the structure.

Parameters:
attribute - The attribute to add
Returns:
Previous value associated with specified key of the attribute, or null if there was no mapping for key.

addAttribute

public void addAttribute(HopsAttribute[] attributes)
Adds a list of attributes to the RecognizedUserInput

Parameters:
attributes - List of attributes to add

getAttribute

public HopsAttribute getAttribute(java.lang.String key)
Returns an attribute recognized

Parameters:
key - The key of the attribue
Returns:
The attribute that corresponds with the name

removeAttribute

public void removeAttribute(java.lang.String key)
Remove the attribute ( if found )

Parameters:
key - The key of the attribue

getAllAttributes

public HopsAttribute[] getAllAttributes()
Returns all the attributes recognized

Returns:
The list of attributes recognized

getKeys

public java.util.Set getKeys()
Returns all the keys of the attributes stored

Returns:
All the keys stored

getAttributes

public java.util.Collection getAttributes()
Returns all the attributes stored

Returns:
All the attributes stored as Collection data structure

clear

public void clear()
Clear the RecognizedUserInput


size

public int size()
Gets the size of the attributes stored in the RecognizedUserInput


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object