-
Notifications
You must be signed in to change notification settings - Fork 6
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
Subtract a low order n-gram LM from a high order n-gram LM #24
base: master
Are you sure you want to change the base?
Conversation
@@ -118,13 +118,33 @@ class OptimizedHistKey { | |||
|
|||
} // namespace | |||
|
|||
class ArpaLmCompilerImplInterface { | |||
public: | |||
virtual ~ArpaLmCompilerImplInterface() = default; |
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.
any chance of some short comments here explaining the interface?
the only other comment I have is, of course check it doesn't change the behavior for normal inputs.
StateId dest; | ||
Symbol sym = ngram.words.back(); | ||
float weight = -ngram.logprob; | ||
float backoff = -ngram.backoff; | ||
|
||
if (low_order == nullptr) { |
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.
is it necessary that the lm to subtract is actually of lower order? If it would work regardless, we might as well make it as general as possible and name it accordingly.
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.
... if it can be done elegantly, we can consider generaly linear combinations of logprobs, not just one minus the other.
TODOs