package com.github.bot.curiosone.core.extraction;

import com.github.bot.curiosone.core.nlp.Word;

import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
 * A response from the Curiosone yet to be refined.
 */
public class BrainResponse {

  /** Description. */
  private String text;

  /** Description. */
  private String scope;

  /**
   * Constructor of a BrainResponse.
   *
   * @param text [description]
   * @param scope [description]
   */
  public BrainResponse(String text, String scope) {
    this.text = text;
    this.scope = scope;
  }

  /**
   * getMessage description.
   *
   * @return [description]
   */
  public String getMessage() {
    return text;
  }

  /**
   * getScope description.
   *
   * @return [description]
   */
  public String getScope() {
    return scope;
  }

  /**
   * Returns a string representation of this response.
   *
   * @return a string representation of this response.
   */
  @Override
  public String toString() {
    return text + "(" + scope + ")";
  }

  /**
   * Compares this response to the specified object.
   *
   * @param  other the other response
   * @return {@code true} if this response equals the other response;
   *         {@code false} otherwise
   */
  @Override
  public boolean equals(Object other) {
    if (other == this) {
      return true;
    }
    if (other == null || other.getClass() != this.getClass()) {
      return false;
    }
    BrainResponse that = (BrainResponse) other;
    return this.text.equals(that.text) && this.scope.equals(that.scope);
  }

  /**
   * Returns an integer hash code for this response.
   *
   * @return an integer hash code for this response
   */
  @Override
  public int hashCode() {
    return Objects.hash(text, scope);
  }
}

@@ -189,9 +189,16 @@
 %0A * 
-A
+Stores a
  res
@@ -208,20 +208,16 @@
 se from 
-the 
 Curioson
@@ -221,26 +221,16 @@
 sone
- yet to be refined
+'s Brain
 .%0A *
@@ -270,67 +270,139 @@
  /**
- Description. */%0A  private String text;%0A%0A  /** Description.
+%0A  * Stores the content of the computed answer.%0A  */%0A  private String text;%0A%0A  /**%0A   * Stores the scope of the computed answer.%0A  
  */%0A
@@ -450,13 +450,9 @@
 ruct
-or of
+s
  a B
@@ -467,77 +467,152 @@
 onse
-.%0A   *%0A   * @param text %5Bdescription%5D%0A   * @param scope %5Bdescription%5D
+ instance, containing a text and a scope.%0A   * @param text The content of the computed answer%0A   * @param scope The scope of the computed answer
 %0A   
@@ -732,63 +732,51 @@
   * 
-getMessage description.%0A   *%0A   * @return %5Bdescription%5D
+Returns the content of the computed answer.
 %0A   
@@ -846,61 +846,49 @@
   * 
-getScope description.%0A   *%0A   * @return %5Bdescription%5D
+Returns the scope of the computed answer.
 %0A   
@@ -963,17 +963,17 @@
 turns a 
-s
+S
 tring re
@@ -997,69 +997,14 @@
 his 
-response.%0A   *%0A   * @return a string representation of this r
+BrainR
 espo
@@ -1113,59 +1113,75 @@
  * C
-ompares this response to the specified object.%0A   *
+hecks whether this BrainResponse equals to the given Object or not.
 %0A   
@@ -1189,17 +1189,16 @@
  @param 
- 
 other th
@@ -1209,24 +1209,47 @@
 her response
+ to be compared against
 %0A   * @retur
@@ -1687,33 +1687,25 @@
 Returns 
-an integer hash c
+the HashC
 ode for 
@@ -1705,25 +1705,30 @@
 de for this 
-r
+BrainR
 esponse.%0A   
@@ -1732,60 +1732,81 @@
    *
-%0A   * @return an integer hash cod
+ The HashCode depends on the content and the scop
 e 
+o
 f
-or
  this 
-r
+BrainR
 esponse
+.
 %0A   

improve BrainResponse javadoc