关系:Vocabulary vs. collection size

Heaps’ law: M = kTb
M
is
the
size
of
the
vocabulary,
T
is
the
number
of tokens
in
the
collec*on

Typical
values:
30

k

100
and
b

0.5σ

log M = log K -­ b*log T

关系:Vocabulary中每个term的量 vs. 该term的次序

Zipf’s law: cfi = K/i

i.e. the most frequent term (the) occurs cf1 times

The i th most frequent term has frequency proportional
to
1/i
.

log cfi = log K -­ log i


  • Naive state

  • 压缩Dictionary 

1). Term's data单独拿出成为String形式, Terms里变为了指针,size:4B
  11.2 → 7.6

2). Blocking。If k = 4, then 省了3个terms的空间,即3B*3-4(结束符1B)=5B 
  7.6 → 7.1

3). Front coding, 前缀冗余。
  7.1 → 5.9

如下:

  • 压缩Posting list

1). Seq1 + 1000 = Seq3

小链表表示大链表

2). Simple9

0110(ID), 3(三段), 9(每段的bit数), 1(最后的waste位的个数)。

那么,4+3*9+1 = 32byte = 4 Bit

3). Gap ( If the ave gap of a term is G)

log2G bits/gap, 当然会用到之后的Variabe Byte codes.

4). Variable Byte codes.

增加Control Bit,那么完整的一个数据表示:(0数据,0数据,……,1最后一个数据)

5). Elias-γ code

6). Elias-δ code

7). Golomb code

暂略

[IR] Compression的更多相关文章

  1. [IR] Graph Compression

    Ref: [IR] Compression Ref: [IR] Link Analysis Planar Graph From: http://www.csie.ntnu.edu.tw/~u91029 ...

  2. [IR] Search Server - Sphinx

    使用 Sphinx 更好地进行 MySQL 搜索 - IBM 尽管 MySQL 是一个出色的通用数据库,但是如果您的应用程序需要进行大量搜索,那么使用 Sphinx 可获得更好的性能. 尽管 Sphi ...

  3. 本人AI知识体系导航 - AI menu

    Relevant Readable Links Name Interesting topic Comment Edwin Chen 非参贝叶斯   徐亦达老板 Dirichlet Process 学习 ...

  4. [IR] XML Compression

    Ref: https://www.ibm.com/developerworks/cn/xml/x-datacompression/ Language-Equivalent (类似路径压缩 ) root ...

  5. [IR] Advanced XML Compression - ISX

    Ori paper: http://www.cse.unsw.edu.au/~wong/papers/www07.pdf ISX Requirements 1 Space does matter fo ...

  6. [IR] Advanced XML Compression - XBW

    思考:与ISX对比后能得出什么结论 原理解析: We proposed the XBW-transform that mimics on trees the nice structural prope ...

  7. [IR] BWT+MTF+AC

    BWT (Burrows–Wheeler_transform)数据转换算法 MTF(Move-to-front transform)数据转换 基于统计的压缩算法:游程编码 良心PPT: bwt_bas ...

  8. LLVM 笔记(五)—— LLVM IR

    ilocker:关注 Android 安全(新手) QQ: 2597294287 LLVM 的 IR (Intermediate Representation) 是其设计中的最重要的部分.优化器在进行 ...

  9. Dynamic range compression

    这段时间终于把手头的东西都搞完了,还剩下一个AEC这个模块,这个模块跟整个系统机制有很大关系,单独的模块意义不大. 另外,刚写完一个分类器,希望能大幅提升音乐流派分类的准确率. 下周正式开搞AEC,把 ...

随机推荐

  1. struts2 iterator排序

    因为存入数据库的数据可能不是按照我们想要的方式存进去的.这就导致取出来的时候,不是按照我们想要的方式排序.这时候就要利用struts2的iterator排序功能,按照我们想要的顺序排列. 首先.一个付 ...

  2. MVC视图中处理Json

    /// <summary> /// 登录 /// </summary> /// <param name="value"></param&g ...

  3. Android中Parcelable接口的使用

    在做开发的过程中,序列化是非常常见的.比如要将对象保存本地磁盘或者在网络上传输等.实现序列化有两种方式,一种是实现Serializable接口,第二种是实现Parcelable. Serializab ...

  4. DataGridView很详细的用法(转载)

    一.DataGridView 取得或者修改当前单元格的内容: 当前单元格指的是 DataGridView 焦点所在的单元格,它可以通过 DataGridView 对象的 CurrentCell 属性取 ...

  5. Visual Studio 2008 使用 WinCE 5.0 Emulator

    1. 簡介 由於 Visua Studio 2008 與 WinCE 5.0 Emulator 並沒有完全整合,因此想要測試我們所開發的 Windows CE 程式,需透過設定,將我們所開發的程式丟到 ...

  6. 每日英语:A Whiff Of 'Welcome Home'

    Buying real estate involves weighing a lot of factors: location, price . . . smell? Some condo devel ...

  7. CSRF - 空Referer绕过

    在实际环境中,服务器很多CGI由于一些历史原因,必须允许空Referer的请求.比如:老的客户端版本请求的时候就没有Referer,总不能在服务端一刀切,让老版本的用户都无法正常使用了吧. 这样的CG ...

  8. 求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字。

    import java.util.Scanner; /** * 题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字. * 2+22+222+2222+22222(此时共有5个数 ...

  9. Android开发贴士集合

    Activity.startActivities()——对于从app流的中部启动会非常好. TextUtils.isEmpty()——一个普遍适用的简单工具类. Html.fromHtml()——格式 ...

  10. linux 下 取进程占用内存(MEM)最高的前10个进程

    # linux 下 取进程占用 cpu 最高的前10个进程ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head # linux 下 取进程占用内存 ...