Class SpanishNoun


  • public class SpanishNoun
    extends java.lang.Object
    Author:
    Jorge Campins
    • Constructor Summary

      Constructors 
      Constructor Description
      SpanishNoun()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String capitalize​(java.lang.String noun)
      Returns the nicely capitalized form of a noun.
      static boolean isPlural​(java.lang.String word)
      Tests whether the given (presumed) Spanish noun is plural.
      static boolean isSingular​(java.lang.String word)
      Tests whether the given (presumed) Spanish noun is singular.
      static java.lang.String pluralOf​(java.lang.String word)
      Returns the plural of a given (presumed) Spanish word.
      static java.lang.String pluralOfMultiwordExpression​(java.lang.String mwe)  
      static java.lang.String singularOf​(java.lang.String word)
      Returns the singular of a given (presumed) Spanish word.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpanishNoun

        public SpanishNoun()
    • Method Detail

      • capitalize

        public static java.lang.String capitalize​(java.lang.String noun)
        Returns the nicely capitalized form of a noun.
        Parameters:
        noun - a noun
        Returns:
        capitalized noun
      • isPlural

        public static boolean isPlural​(java.lang.String word)
        Tests whether the given (presumed) Spanish noun is plural.
        Parameters:
        word - a word
        Returns:
        true if word is plural; false otherwise
      • isSingular

        public static boolean isSingular​(java.lang.String word)
        Tests whether the given (presumed) Spanish noun is singular.
        Parameters:
        word - a word
        Returns:
        true if word is singular; false otherwise
      • pluralOf

        public static java.lang.String pluralOf​(java.lang.String word)
        Returns the plural of a given (presumed) Spanish word. The given word may be singular or (already) plural.
        Parameters:
        word - a word
        Returns:
        the plural of word
      • singularOf

        public static java.lang.String singularOf​(java.lang.String word)
        Returns the singular of a given (presumed) Spanish word. The given word may be plural or (already) singular.
        Parameters:
        word - a word
        Returns:
        the singular of word
      • pluralOfMultiwordExpression

        public static java.lang.String pluralOfMultiwordExpression​(java.lang.String mwe)