code taken from https://github.com/salesforce/awd-lstm-lm and https://github.com/abisee/pointer-generator/blob/master/data.py
code taken from https://github.com/salesforce/awd-lstm-lm and https://github.com/abisee/pointer-generator/blob/master/data.py
BSD 3-Clause "New" or "Revised" License