s407599-plots/plot.py
Gabriela Pałka a5d57fbc69 Add plot.py
2020-04-03 16:56:09 +02:00

19 lines
539 B
Python
Executable File

import matplotlib.pyplot as plt
if __name__ == '__main__':
wer = []
srr = []
with open('wer.txt', 'r') as w, open('srr.txt') as s:
for line in w:
wer.append(float(line.strip()))
for line in s:
srr.append(float(line.strip()))
fig, ax = plt.subplots()
ax.plot(list(range(1, len(wer) + 1)), wer, label='word error rate')
ax.plot(list(range(1, len(srr) + 1)), srr, label='sentence recognition rate')
ax.set_title("WER and SRR")
ax.legend()
plt.savefig('plot.png')