-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Ngram scorer #1946
Implement Ngram scorer #1946
Conversation
This pull request is now in conflict :( |
@@ -36,3 +36,21 @@ exp/train_sp_pytorch_no_patience/decode_test_beam20_emodel.acc.best_p0.0_len0.0- | |||
| SPKR | # Snt # Wrd | Corr Sub Del Ins Err S.Err | | |||
| Sum/Avg | 7176 104765 | 92.2 7.6 0.2 0.2 8.0 50.2 | | |||
``` | |||
|
|||
# Ngram related | |||
- there is no RNN not ngram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This result looks promising. Have you ever tried ngram-RNNLM interpolation (joint decoding)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's my recommendation, too, and @qmpzzpmq is trying now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried, but there is no result better than currently one.
I guess it takes time to tuning the decoding weight parameters.
@ShigekiKarita |
@ShigekiKarita is everything alright? |
Co-authored-by: b-flo <41155456+b-flo@users.noreply.github.com>
@@ -0,0 +1,6 @@ | |||
ngram-weight: 1.0 | |||
beam-size: 20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you modify run.sh for tedliums2?
Is this a garbage file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
egs/tedlium2/asr1/path.sh
Outdated
@@ -2,10 +2,11 @@ MAIN_ROOT=$PWD/../../.. | |||
KALDI_ROOT=$MAIN_ROOT/tools/kaldi | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@ShigekiKarita What do you think about the path of ngram scorer? I think espnet/nets/scorers is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
egs/aishell/asr1/run.sh
Outdated
@@ -178,6 +182,26 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then | |||
--dict ${dict} | |||
fi | |||
|
|||
ngramexpname=train_ngram |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include this ngram LM training in stage 3?
I want to keep the role of the stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I agree. |
Co-authored-by: Shinji Watanabe <sw005320@gmail.com>
@@ -176,8 +187,20 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; then | |||
--valid-label ${lmdatadir}/valid.txt \ | |||
--resume ${lm_resume} \ | |||
--dict ${dict} | |||
|
|||
echo "stage 4: Ngram Preparation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "stage 4: Ngram Preparation" | |
echo "stage 3: Ngram Preparation" |
Very cool! |
@sw005320 done |
I think this PR is almost ready. I just want to make sure that @ShigekiKarita would agree with putting this in |
Great work! |
@b-flo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks a lot for resolving our many requests!
hi,
Here is Haoyu Tang from BIGO speech. I implement ngram with kenlm, and test it in aishell test since it works badly in BPE.
It could improve only e2e model, but still not as good as RNNLM. it might since I didn't tuning the decoding parameters.