(ids, vocab_file_path)
return sentences
transform array of numbers to array of tags/words
  ids:  [[1,2],[3,4]...]
transform array of numbers to array of tags/words
  ids:  [[1,2],[3,4]...]
transform array of numbers to array of tags / words ids : [[ 1 2 ] [ 3 4 ] ... ]
def ids_to_sentences(ids, vocab_file_path):
  """
  transform array of numbers to array of tags/words
  ids:  [[1,2],[3,4]...]
  """

  vocab_dict = load_vocab_dict(vocab_file_path)
  id_to_vocab = {int(v): k for k, v in vocab_dict.items()}

  sentences = []
  for sent in ids:
    sent_char = []
    for s_char in sent:
      if s_char not in id_to_vocab:
        logging.error("label not in vocabs")
      else:
        sent_char.append(id_to_vocab[s_char])
    sentences.append(sent_char)
  assert len(sentences) == len(ids)
  return sentences
def ids_to_sentences ( ids , vocab_file_path ) : vocab_dict = load_vocab_dict ( vocab_file_path ) id_to_vocab = { int ( v ) : k for k , v in vocab_dict . items ( ) } sentences = [ ] for sent in ids : sent_char = [ ] for s_char in sent : if s_char not in id_to_vocab : logging . error ( "label not in vocabs" ) else : sent_char . append ( id_to_vocab [ s_char ] ) sentences . append ( sent_char ) assert len ( sentences ) == len ( ids ) return sentences