         territories[territories.length - 1].territoryEnd = sentEnd
   return territories
 
-export createIncidentReportsFromEnhancements = (enhancements, options)->
+export createIncidentReportsFromEnhancements = (enhancements, options) ->
   { countAnnotations, acceptByDefault, articleId, publishDate } = options
   if not publishDate
     publishDate = new Date()

  # Only include the sentence the word appears in for species territories since
  # the species is implicitly human in most of the articles we're analyzing.
  speciesTerritories = getTerritories(speciesAnnotations, sents, sentenceOnly: true)
  console.log speciesTerritories
  countAnnotations.forEach (countAnnotation) =>
    [start, end] = countAnnotation.textOffsets[0]
    locationTerritory = _.find locTerritories, ({territoryStart, territoryEnd}) ->

  WGST: '-0200'
  WGT: '-0300'

export regexEscape = (s) ->
  # Based on bobince's regex escape function.
  # source: http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript/3561711#3561711
  s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
