zihangdai / xlnet

XLNet: Generalized Autoregressive Pretraining for Language Understanding
Apache License 2.0
6.17k stars 1.18k forks source link

Provide a utility to extract features from texts? #26

Open hzeng-otterai opened 5 years ago

hzeng-otterai commented 5 years ago

Congratulations on the wonderful work!

I can't wait to try the model. Do you have plan to provide a utility to extract vectors for some sample texts. Just as the extract_features.py in the BERT repo? Or is there other ways to easily run the model against some raw texts?

kimiyoung commented 5 years ago

Good point. This example snippet is a use case of extracting features (seq_out will be what you want). We might also add a python file to specifically do that in the future.