Designed for fixing wrong words generated by speech recognition models(trained model focused on medical field). This is an early version. May need tensorflow_gpu pre-installed.
For demo, try: python3 fixing.py "testbench"
The program will try to fix the wrong words in the file "mutated.txt" and compute the performance based on the correct result ("mutated_ref.txt").
Fixing result: see sample_out.png.
Four different models are used in this demo:
N-gram model;
LSTM model;
(Bi-directional) N-gram model;
(Bi-directional) LSTM model;
Where I believe the bi-directional designs are quite original.
Further design might combine these models via some vote algorithm.
Training sets used in this project: here ---> https://github.com/FalsitaFine/info_collect