org.encog.util.text

## Class BagOfWords

- java.lang.Object
- - org.encog.util.text.BagOfWords

-     public class BagOfWords
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BagOfWords()`
    `BagOfWords(int laplace)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `boolean` | `contains(String word)`
    `int` | `getCount(String word)`
    `int` | `getK()`
    `int` | `getLaplaceClasses()`
    `int` | `getTotalWords()`
    `int` | `getUniqueWords()`
    `Map<String,Integer>` | `getWords()`
    `void` | `increase(String word)`
    `boolean` | `isBreakSpaces()`
    `boolean` | `isIgnoreCase()`
    `double` | `probability(String word)`
    `void` | `process(String str)`
    `void` | `setBreakSpaces(boolean breakSpaces)`
    `void` | `setIgnoreCase(boolean ignoreCase)`
    `void` | `setLaplaceClasses(int laplaceClasses)`
    `void` | `setTotalWords(int totalWords)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### BagOfWords

          public BagOfWords(int laplace)

    - #### BagOfWords

          public BagOfWords()

  - ### Method Detail

    - #### process

          public void process(String str)

    - #### increase

          public void increase(String word)

    - #### isBreakSpaces

          public boolean isBreakSpaces()

      Returns:
        the breakSpaces

    - #### setBreakSpaces

          public void setBreakSpaces(boolean breakSpaces)

      Parameters:
        `breakSpaces` - the breakSpaces to set

    - #### isIgnoreCase

          public boolean isIgnoreCase()

      Returns:
        the ignoreCase

    - #### setIgnoreCase

          public void setIgnoreCase(boolean ignoreCase)

      Parameters:
        `ignoreCase` - the ignoreCase to set

    - #### getWords

          public Map<String,Integer> getWords()

      Returns:
        the words

    - #### clear

          public void clear()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### contains

          public boolean contains(String word)

    - #### getK

          public int getK()

    - #### getTotalWords

          public int getTotalWords()

      Returns:
        the totalWords

    - #### getCount

          public int getCount(String word)

    - #### probability

          public double probability(String word)

    - #### getLaplaceClasses

          public int getLaplaceClasses()

      Returns:
        the laplaceClasses

    - #### setLaplaceClasses

          public void setLaplaceClasses(int laplaceClasses)

      Parameters:
        `laplaceClasses` - the laplaceClasses to set

    - #### setTotalWords

          public void setTotalWords(int totalWords)

      Parameters:
        `totalWords` - the totalWords to set

    - #### getUniqueWords

          public int getUniqueWords()

Copyright © 2014. All Rights Reserved.