edu.northwestern.at.morphadorner.corpuslinguistics.lemmatizer

## Interface Lemmatizer

- All Known Implementing Classes:
    AbstractLemmatizer, AbstractStemmerLemmatizer, DefaultLemmatizer, EnglishLemmatizer, LancasterStemmerLemmatizer, PorterStemmerLemmatizer, RuleBasedLemmatizer

      public interface Lemmatizer

  Interface for a Lemmatizer.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cantLemmatize(java.lang.String spelling)` Check for words that cannot be lemmatized.
    `int` | `countLemmata(java.lang.String lemma)` Get number of lemmata comprising this lemma.
    `java.lang.String` | `getLemmaSeparator()` Get the lemma separator string,
    `boolean` | `isCompoundLemma(java.lang.String lemma)` Check if lemma is compound lemma.
    `java.lang.String` | `joinLemmata(java.lang.String[] lemmata)` Join separate lemmata into a compound lemma.
    `java.lang.String` | `joinLemmata(java.lang.String[] lemmata, java.lang.String separator)` Join separate lemmata into a compound lemma.
    `java.lang.String` | `lemmatize(java.lang.String spelling)` Returns a lemma given a spelling.
    `java.lang.String` | `lemmatize(java.lang.String spelling, java.lang.String wordClass)` Returns a lemma given a spelling and a part of speech.
    `void` | `setDictionary(java.util.Set<java.lang.String> dictionary)` Set the dictionary for checking lemmata.
    `void` | `setLexicon(Lexicon lexicon)` Set the lexicon which may provide lemmata.
    `java.lang.String[]` | `splitLemma(java.lang.String lemma)` Split compound lemma into separate lemmata.

- - ### Method Detail

    - #### setLexicon

          void setLexicon(Lexicon lexicon)

      Set the lexicon which may provide lemmata.
      Parameters:
        `lexicon` - The lexicon.

    - #### setDictionary

          void setDictionary(java.util.Set<java.lang.String> dictionary)

      Set the dictionary for checking lemmata.
      Parameters:
        `dictionary` - The dictionary as a string set. May be null.

    - #### lemmatize

          java.lang.String lemmatize(java.lang.String spelling)

      Returns a lemma given a spelling.
      Parameters:
        `spelling` - The spelling.
      Returns:
        The lemma. "*" is returned if the lemma cannot be found.

    - #### lemmatize

          java.lang.String lemmatize(java.lang.String spelling,
                                   java.lang.String wordClass)

      Returns a lemma given a spelling and a part of speech.
      Parameters:
        `spelling` - The spelling.
        `wordClass` - The word class.
      Returns:
        The lemma. "*" is returned if the lemma cannot be found.

        The word class should be a major word class as defined in `PartOfSpeech`.

    - #### cantLemmatize

          boolean cantLemmatize(java.lang.String spelling)

      Check for words that cannot be lemmatized.
      Parameters:
        `spelling` - The spelling to be lemmatized.
      Returns:
        true if spelling is not a lemmatizable word -- e.g., it contains punctuation, is a number, or is a Roman numeral.

    - #### getLemmaSeparator

          java.lang.String getLemmaSeparator()

      Get the lemma separator string,
      Returns:
        String to separate lemmata in compound lemma.

    - #### joinLemmata

          java.lang.String joinLemmata(java.lang.String[] lemmata,
                                     java.lang.String separator)

      Join separate lemmata into a compound lemma.
      Parameters:
        `lemmata` - String array of lemmata.
        `separator` - String to separate lemmata.
      Returns:
        String containing joined lemmata. The lemmata are separated by the specified separator character.

    - #### joinLemmata

          java.lang.String joinLemmata(java.lang.String[] lemmata)

      Join separate lemmata into a compound lemma.
      Parameters:
        `lemmata` - String array of part of speech lemmas.
      Returns:
        String containing joined lemmata. The lemmata are separated by the default separator character.

    - #### splitLemma

          java.lang.String[] splitLemma(java.lang.String lemma)

      Split compound lemma into separate lemmata.
      Parameters:
        `lemma` - The compound lemma.
      Returns:
        String array of lemmata. Only one entry if lemma is not a compound lemma.

    - #### isCompoundLemma

          boolean isCompoundLemma(java.lang.String lemma)

      Check if lemma is compound lemma.
      Parameters:
        `lemma` - The lemma.
      Returns:
        true if lemma is compound lemma.

    - #### countLemmata

          int countLemmata(java.lang.String lemma)

      Get number of lemmata comprising this lemma.
      Parameters:
        `lemma` - The lemma.
      Returns:
        Count of individual lemmata comprising this lemma.