Imported from https://github.com/MarkWuNLP/TACNTN