apraditya/indonesian_stemmer

Complex method in #stem_derivational

      def stem_derivational(word)
        previous_size = word.size
        remove_first_order_prefix(word) if still_has_many_syllables?
        if previous_size != word.size
          previous_size = word.size
Found in IndonesianStemmer - About 2 hrs to fix

Long or complex methods can make code harder to understand. In most circumstances, methods are best as a small chunk of code (the "how") with a clear, understandable name (the "what"). Long methods can also lead to duplication, as it's harder to reuse logic that is tightly coupled to surrounding code.

Refactorings

Read More

Complex method in #remove_second_order_prefix

    def remove_second_order_prefix(word)
      @number_of_syllables ||= total_syllables(word)
      word_size = word.size

      if SPECIAL_SECOND_ORDER_PREFIX_WORDS.include?(word)
Found in IndonesianStemmer::MorphologicalUtility - About 2 hrs to fix

Long or complex methods can make code harder to understand. In most circumstances, methods are best as a small chunk of code (the "how") with a clear, understandable name (the "what"). Long methods can also lead to duplication, as it's harder to reuse logic that is tightly coupled to surrounding code.

Refactorings

Read More