Sentence Encoding with Tree-constrained Relation Networks