package com.github.bot.curiosone.core.nlp.base;

/**
 * Different typology of sentence.
 */

public enum PhraseType {

  /**
   * Sentence in input is a question.
   */
  QUESTION,

  /**
   * Sentence in input is an affirmation.
   */
  AFFIRMATION,

  /**
   * Sentence in input is an exclamation.
   */
  EXCLAMATION;

  public static PhraseType get(String str) {
    char c = str.charAt(str.length() - 1);
    switch (c) {
      case '?': return QUESTION;
      case '!': return EXCLAMATION;
    }
    return AFFIRMATION;
  }
}

@@ -46,17 +46,16 @@
 e;%0A%0A/**%0A
- 
 * Differ
@@ -80,17 +80,16 @@
 ntence.%0A
- 
 */%0A%0Apubl
@@ -110,33 +110,32 @@
 Type %7B%0A%0A  /**%0A  
- 
 * Sentence in in
@@ -149,25 +149,24 @@
 a question.%0A
- 
   */%0A  QUEST
@@ -171,33 +171,32 @@
 STION,%0A%0A  /**%0A  
- 
 * Sentence in in
@@ -214,25 +214,24 @@
 ffirmation.%0A
- 
   */%0A  AFFIR
@@ -247,17 +247,16 @@
   /**%0A  
- 
 * Senten
@@ -286,17 +286,16 @@
 mation.%0A
- 
   */%0A  E
@@ -307,16 +307,126 @@
 ATION;%0A%0A
+  /**%0A  * Returns the PhraseType for the given input phrase.%0A  * @param str the Phrase to be examinated.%0A  */%0A
   public
@@ -599,13 +599,18 @@
     
-%7D%0A   
+  default:
  ret
@@ -626,14 +626,20 @@
 MATION;%0A
+    %7D%0A
   %7D%0A%7D%0A

fix PhraseType class codestyle