Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
courses:rg:2012:longdtreport [2012/03/12 22:49] longdt |
courses:rg:2012:longdtreport [2012/03/12 22:50] longdt |
||
---|---|---|---|
Line 24: | Line 24: | ||
__Sorted Array__ | __Sorted Array__ | ||
- | + Use n array for n-gram model (array i-th is used for i-gram) | + | |
- | | + | - Use n array for n-gram model (array i-th is used for i-gram) |
- | | + | - Each element in array in pair (w,c) |
- | | + | |
- | | + | |
+ | - Sort base on w | ||
Improvement : Implicitly encode W (all n-gram ending with particular word wi are stored -> wasteful. So, maintain another array save the beginning and the end of the range | Improvement : Implicitly encode W (all n-gram ending with particular word wi are stored -> wasteful. So, maintain another array save the beginning and the end of the range | ||