document_line_deduplicator¶
Deduplicates at the line level across documents.
This operator identifies lines that appear in many documents (boilerplate text, copyright notices, navigation bars, etc.) and removes them. It works in two phases:
compute_hash – splits each document into lines, applies configurable skip rules, and computes an MD5 hash for every non-skipped line.
process – counts in how many distinct documents each line hash appears. Lines whose document frequency exceeds
frequency_thresholdare removed from every document.
在文档间进行行级去重。
该算子识别出现在多个文档中的行(样板文本、版权声明、导航栏等)并将其移除。它分为两个阶段工作:
compute_hash – 将每个文档拆分为行,应用可配置的跳过规则,并为每个未跳过的行计算 MD5 哈希值。
process – 统计每个行哈希值出现在多少个不同文档中。文档频率超过
frequency_threshold的行将从所有文档中移除。
Type 算子类型: deduplicator
Tags 标签: cpu, text
🔧 Parameter Configuration 参数配置¶
name 参数名 |
type 类型 |
default 默认值 |
desc 说明 |
|---|---|---|---|
|
<class 'int'> |
|
document-frequency threshold. Lines appearing in more than this many documents are removed. |
|
<class 'bool'> |
|
whether to lower-case a line before hashing. |
|
<class 'bool'> |
|
whether to strip whitespace, digits, and punctuation before hashing. |
|
<class 'int'> |
|
lines whose stripped length is below this value are skipped (never considered for dedup). |
|
<class 'bool'> |
|
skip lines consisting solely of bracket / semicolon characters such as |
|
<class 'bool'> |
|
skip lines that start with |
|
<class 'bool'> |
|
skip LaTeX |
|
<class 'bool'> |
|
skip lines that are pure HTML / XML tags. |
|
`` |
extra args |
|
|
`` |
extra args |