def guess_section_number_after_title(text)
      before = text.scan(/^\w{4,}[^\n]+\n\d+\. /).length
      after  = text.scan(/^\s*\n\d+\. \w{4,}/).length

      before > after * 1.25
    end
def guess_section_number_after_title(text)
      before = text.scan(/^\w{4,}[^\n]+\n\d+\. /).length
      after  = text.scan(/^\s*\n\d+\. \w{4,}/).length

      before > after * 1.25
    end
Try to determine if section numbers come after titles,
 rather than before.

 eg:

   Section title
   1. Section content

 versus

   1. Section title
   Section content