SentenceRepresentation icon indicating copy to clipboard operation
SentenceRepresentation copied to clipboard

Adding code to get sentence representations

Open ducdauge opened this issue 8 years ago • 0 comments

I modified 2 files and added a new one.

  1. desent.py has a new function, embedding, to get representations given a trained model and an input file with one sentence per line. Also, I fixed a minor problems with numpy.round(), which yielded a float rather than an integer.
  2. build_dictionary.py now uses codecs tho handle input and output files. Otherwise, it considers only ansi-encoded characters.
  3. sentence_representation.py is a wrapper for convenience's sake. It invokes the relevant functions in desent.py and allows to modify the configuration easily.

ducdauge avatar Mar 04 '17 16:03 ducdauge