@ironarachne/words
    Preparing search index...

    Function comparative

    • This function returns the comparative form of an adjective.

      Uses irregular forms for common words (good -> better) and heuristic rules for regular adjectives:

      • 1 syllable: add -er (fast -> faster)
      • 1 syllable ending in CVC: double consonant (big -> bigger)
      • 2 syllables ending in -y: change y to -ier (happy -> happier)
      • 2 syllables ending in -e: add -r (large -> larger)
      • 2 syllables ending in -le or -ow: add -er (simple -> simpler, narrow -> narrower)
      • 3+ syllables: use "more" (beautiful -> more beautiful)

      Parameters

      • word: string

        The adjective to make comparative.

      Returns string

      The comparative form.