How can I get perplexity score in a text file?

I need to plot the perplexity score plots, Is there any way by which I can get in text file??
I tried to output log files too, but they were kinda empty.

With which system?

@Bachstelze Thanks for your reply, But what do you mean by system? I am using Machine Translation System.

Do you use the tensorflow or pytorch version?
What is written in your log file?