gemogi = require 'gemogi'
customTag = (word, tag) ->
if tag isnt 'x' # We process only x
tag
if word in startTags
'_my_start'
else if word in endTags
'_my_end'
else if word in balTags
'_my_bal'
else if word in litTags
'_my_lit_' + word
else if word in gemogi.named # I'd prefer contains().
'_my_emoji' # + gemogi.unicode[named].tags[0]
else
tag
Naive implmentation: