I am writing a program in Go to generate a report of crimes in my University. I have run into a roadblock where I need to find if one word is a plural of another. I am making a map of crimes first
crimes := make(map[string]int)
then, adding crimes to the map with the number of occurrences as int
for i := 0; i < len(feed.Items); i++ {
crimes[feed.Items[i].Title[11:]]++
}
Now, the problem arises when there are entries like, "Armed Robberies (with a count of 1)" and "Armed Robbery (with a count of 2)". I want to check if a word is a plural of another. In this case, I want to make a single entry for "Armed Robbery (with a count of 3)". I could not find a package for doing this. Is there a way to do this?