def get_word_id (root):
  global UNIQ_WORDS

  # in practice, this should use a microservice via some robust
  # distributed cache, e.g., Cassandra, Redis, etc.

  if root not in UNIQ_WORDS:
    UNIQ_WORDS[root] = len(UNIQ_WORDS)

  return UNIQ_WORDS[root]
lookup/assign a unique identify for each word
dataset/ETHPy150Open ceteri/exsto/exsto.py/get_word_id