All Projects → yaushian → Tree Transformer

yaushian / Tree Transformer

Implementation of the paper Tree Transformer

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tree Transformer

Practical Machine Learning With Python
Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Stars: ✭ 1,868 (+1162.16%)
Mutual labels:  natural-language-processing
Absapapers
Worth-reading papers and related awesome resources on aspect-based sentiment analysis (ABSA). 值得一读的方面级情感分析论文与相关资源集合
Stars: ✭ 142 (-4.05%)
Mutual labels:  natural-language-processing
Hands On Natural Language Processing With Python
This repository is for my students of Udemy. You can find all lecture codes along with mentioned files for reading in here. So, feel free to clone it and if you have any problem just raise a question.
Stars: ✭ 146 (-1.35%)
Mutual labels:  natural-language-processing
Paper Survey
📚Survey of previous research and related works on machine learning (especially Deep Learning) in Japanese
Stars: ✭ 140 (-5.41%)
Mutual labels:  natural-language-processing
Monkeylearn Python
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.
Stars: ✭ 143 (-3.38%)
Mutual labels:  natural-language-processing
Ai Job Info
互联网大厂面试经验
Stars: ✭ 145 (-2.03%)
Mutual labels:  natural-language-processing
Learn To Select Data
Code for Learning to select data for transfer learning with Bayesian Optimization
Stars: ✭ 140 (-5.41%)
Mutual labels:  natural-language-processing
Words counted
A Ruby natural language processor.
Stars: ✭ 146 (-1.35%)
Mutual labels:  natural-language-processing
Multihead Siamese Nets
Implementation of Siamese Neural Networks built upon multihead attention mechanism for text semantic similarity task.
Stars: ✭ 144 (-2.7%)
Mutual labels:  natural-language-processing
Nl2sql
阿里天池首届中文NL2SQL挑战赛top6
Stars: ✭ 146 (-1.35%)
Mutual labels:  natural-language-processing
Stanza Old
Stanford NLP group's shared Python tools.
Stars: ✭ 142 (-4.05%)
Mutual labels:  natural-language-processing
Neusum
Code for the ACL 2018 paper "Neural Document Summarization by Jointly Learning to Score and Select Sentences"
Stars: ✭ 143 (-3.38%)
Mutual labels:  natural-language-processing
Scientific Paper Summarisation
Machine learning models to automatically summarise scientific papers
Stars: ✭ 145 (-2.03%)
Mutual labels:  natural-language-processing
Nlpaug
Data augmentation for NLP
Stars: ✭ 2,761 (+1765.54%)
Mutual labels:  natural-language-processing
Char Cnn Text Classification Pytorch
Character-level Convolutional Neural Networks for text classification in PyTorch
Stars: ✭ 147 (-0.68%)
Mutual labels:  natural-language-processing
Lexpredict Contraxsuite
LexPredict ContraxSuite
Stars: ✭ 140 (-5.41%)
Mutual labels:  natural-language-processing
Awesome Nlp Resources
This repository contains landmark research papers in Natural Language Processing that came out in this century.
Stars: ✭ 145 (-2.03%)
Mutual labels:  natural-language-processing
Turkce Yapay Zeka Kaynaklari
Türkiye'de yapılan derin öğrenme (deep learning) ve makine öğrenmesi (machine learning) çalışmalarının derlendiği sayfa.
Stars: ✭ 1,900 (+1183.78%)
Mutual labels:  natural-language-processing
Fxdesktopsearch
A JavaFX based desktop search application.
Stars: ✭ 147 (-0.68%)
Mutual labels:  natural-language-processing
Googlelanguager
R client for the Google Translation API, Google Cloud Natural Language API and Google Cloud Speech API
Stars: ✭ 145 (-2.03%)
Mutual labels:  natural-language-processing

Tree Transformer

This is the official implementation of the paper Tree Transformer: Integrating Tree Structures into Self-Attention. If you use this code or our results in your research, we'd appreciate you cite our paper as following:

@article{Wang2019TreeTransformer,
  title={Tree Transformer: Integrating Tree Structures into Self-Attention},
  author={Yau-Shian Wang and Hung-Yi Lee and Yun-Nung Chen},
  journal={arXiv preprint arXiv:1909.06639},
  year={2019}
}

Dependencies

  • python3
  • pytorch 1.0

We use BERT tokenizer from PyTorch-Transformers to tokenize words. Please install PyTorch-Transformers following the instructions of the repository.

Training

For grammar induction training:
python3 main.py -train -model_dir [model_dir] -num_step 60000
The default setting achieves F1 of approximatedly 49.5 on WSJ test set. The training file 'data/train.txt' includes all WSJ data except 'WSJ_22 and WSJ_23'.

Evaluation

For grammar induction testing:
python3 main.py -test -model_dir [model_dir]
The code creates a result directory named model_dir. The result directory includes 'bracket.json' and 'tree.txt'. File 'bracket.json' contains the brackets of trees outputted from the model and they can be used for evaluating F1. The ground truth brackets of testing data can be obtained by using code of on-lstm. File 'tree.txt' contains the parse trees. The default testing file 'data/test.txt' contains the tests of wsj_23.

Acknowledgements

Contact

[email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].