edu.northwestern.at.morphadorner.corpuslinguistics.stopwords

## Class BaseStopWords

- java.lang.Object
- - edu.northwestern.at.morphadorner.corpuslinguistics.stopwords.BaseStopWords

- All Implemented Interfaces:
    StopWords
  Direct Known Subclasses:
    BuckleyAndSaltonStopWords, ChoiStopWords, PorterStopWords

      public class BaseStopWords
      extends java.lang.Object
      implements StopWords

  Base stop word list.

  Creates a stop word list.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.util.Set<java.lang.String>` | `stopWordsSet` Save stop words as a set.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseStopWords()` Create empty stop word list.
    `BaseStopWords(java.util.Collection<java.lang.String> stopWords)` Create stop word list from a collection.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStopWord(java.lang.String stopWord)` Add word to stop word list.
    `void` | `addStopWords(java.util.Collection<java.lang.String> stopWords)` Add words to stop word list.
    `java.util.List<java.lang.String>` | `getStopWords()` Return stop words as a List.
    `boolean` | `isStopWord(java.lang.String stopWord)` Tests if a specified word is a stop word.

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

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

- - ### Field Detail

    - #### stopWordsSet

          protected java.util.Set<java.lang.String> stopWordsSet

      Save stop words as a set.

  - ### Constructor Detail

    - #### BaseStopWords

          public BaseStopWords()

      Create empty stop word list.

    - #### BaseStopWords

          public BaseStopWords(java.util.Collection<java.lang.String> stopWords)

      Create stop word list from a collection.

  - ### Method Detail

    - #### addStopWord

          public void addStopWord(java.lang.String stopWord)

      Add word to stop word list.
      Parameters:
        `stopWord` - Stop word to add.

    - #### addStopWords

          public void addStopWords(java.util.Collection<java.lang.String> stopWords)

      Add words to stop word list.
      Parameters:
        `stopWords` - Collection of stop words to add.

    - #### isStopWord

          public boolean isStopWord(java.lang.String stopWord)

      Tests if a specified word is a stop word.
      Specified by:
        `isStopWord` in interface `StopWords`
      Parameters:
        `stopWord` - The word to check.
      Returns:
        true if word is a stop word.

    - #### getStopWords

          public java.util.List<java.lang.String> getStopWords()

      Return stop words as a List.
      Specified by:
        `getStopWords` in interface `StopWords`
      Returns:
        String list of stop words.