You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 921 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Prototype
  2. ## Word2Idx.py
  3. A mapping model between words and indexes
  4. ## embedding.py
  5. embedding modules
  6. Contains a simple encapsulation for torch.nn.Embedding
  7. ## encoder.py
  8. encoder modules
  9. Contains a simple encapsulation for torch.nn.LSTM
  10. ## aggregation.py
  11. aggregation modules
  12. Contains a self-attention model, according to paper "A Structured Self-attentive Sentence Embedding", https://arxiv.org/abs/1703.03130
  13. ## predict.py
  14. predict modules
  15. Contains a two layers perceptron for classification
  16. ## example.py
  17. An example showing how to use above modules to build a model
  18. Contains a model for sentiment analysis on Yelp dataset, and its training and testing procedures. See https://arxiv.org/abs/1703.03130 for more details.
  19. ## prepare.py
  20. A case of using Word2Idx to build Yelp datasets
  21. ## dataloader.py
  22. A dataloader for Yelp dataset
  23. It is an iterable object, returning a zero-padded batch every iteration.