title: How to count the appearance of each word in text
body: <p>Or the question could also be:
  What is the Go way of getting bags of words?</p>
  
  <p>For example, if the input is </p>
  
  <p><code>"This is a big apple tree. I love big big apple! 42"</code></p>
  
  <p>then how do I get an output of map with count of each word (and, if conveniently, do some simple string parsing along the way such as only keep letters and lower them):</p>
  
  <p><code>{this=1, is=1, a=1, big=3, apple=2, tree=1, i=1, love=1}</code></p>
  
  <hr>
  
  <p>The simple version of some Kotlin code can be like:</p>
  
  <pre><code>fun main(args: Array&lt;String&gt;) {
      val inputText = "This is a big apple tree. I love big big apple! 42"
  
      val map = inputText.replace("[^a-zA-Z]+".toRegex(), " ") // only keep letters
              .trim()
              .toLowerCase()
              .split(" ")
              .groupingBy { it }
              .eachCount()
  
      println(map)
  }
  </code></pre>
  
  <p>gives output <code>{this=1, is=1, a=1, big=3, apple=2, tree=1, i=1, love=1}</code></p>
  
  <p>I would like to know what's the equivalent Golang way of doing something like this.
  Hopefully it is fast, easy to read as well.</p>