Description Usage Arguments Details Value Author(s) Examples
Prune M
-gram frequency tables or Stupid Back-Off prediction tables for
an M
-gram model to a smaller order N
.
1 2 3 4 5 6 7 |
object |
A |
N |
a length one positive integer. N-gram order of the new object. |
... |
further arguments passed to or from other methods. |
This generic function provides a helper to prune M-gram frequency
tables or M-gram models, represented by sbo_kgram_freqs
and
sbo_predtable
objects respectively, to objects of a smaller N-gram
order, N < M. For k-gram frequency objects, frequency tables for
k > N are simply dropped. For sbo_predtable
's, the predictions coming
from the nested N-gram model are instead retained. In both cases, all other
other attributes besides k-gram order (such as the corpus preprocessing
function, or the lambda
penalty in Stupid Back-Off training) are left
unchanged.
an object of the same class of the input object
.
Valerio Gherardi
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.