def pseudocorpus(source_vocab, sep):
 for k in source_vocab:
  if (sep not in k):
   continue
  unigrams = k.split(sep)
  for i in range(1, len(unigrams)):
   (yield [sep.join(unigrams[:i]), sep.join(unigrams[i:])])

def pseudocorpus ( source_vocab , sep ) : for k in source_vocab : if ( sep not in k ) : continue unigrams = k . split ( sep ) for i in range ( 1 , len ( unigrams ) ) : ( yield [ sep . join ( unigrams [ : i ] ) , sep . join ( unigrams [ i : ] ) ] )
feeds source_vocabs compound keys back to it .