You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
annotation tag contamination reduced trafilatura's evaluation score #68
The HTML samples in the WebMainBench 545-sample subset were saved from a browser
with annotation plugins active. This injected non-standard DOM elements and
attributes into the saved HTML, affecting parser evaluation fairness. Most of htmls have <marked-tail> / <marked-text>, trafilatura would probably strip these tags and recall less text.
A Chrome-based content annotation extension (similar to ContentCat) wraps every
text node in custom elements to assign unique IDs for selection and labelling:
<!-- Original HTML --><pre><code>import numpy as np
arr = np.array([1, 2, 3])
print(arr)</code></pre><!-- After annotation plugin injection --><pre><code><marked-textdata-anno-uid="abc">import numpy as np</marked-text><marked-taildata-anno-uid="def">arr = np.array([1, 2, 3])</marked-tail><marked-textdata-anno-uid="ghi">print(arr)</marked-text></code></pre>
<marked-tail> wraps lxml "tail text" (text after a child element)
<marked-text> wraps lxml "text" (direct text content of an element)
Prevalence in the 545-sample subset:
Artifact
Affected Samples
<marked-tail> tags
526 / 545 (96.5%)
<marked-text> tags
516 / 545 (94.7%)
data-anno-uid attributes
545 / 545 (100.0%)
2. Immersive Translate Extension
A browser translation extension left residual elements in the saved HTML.
Artifact
Affected Samples
notranslate / immersive-translate elements
167 / 545 (30.6%)
Approximately 5% of samples contain actually injected translation text, which
can cause extractors to output duplicate or translated content.
Activity
e06084 commentedon Apr 8, 2026
many thanks for your suggestion, we will check that
adbar commentedon Jun 12, 2026
Please also check the way you run Trafilatura.
Here you use the baseline and not actually Trafilatura, the extract() function is commented out:
WebMainBench/webmainbench/extractors/trafilatura_txt_extractor.py
Line 62 in 77da09c
And here you use a combination of options which is not standard (
favor_recallandfavor_precisionare set toFalsein the standard version):WebMainBench/webmainbench/extractors/trafilatura_extractor.py
Line 16 in 77da09c
e06084 commentedon Jun 13, 2026
Fix HTML cleanup and Trafilatura leaderboard evaluatio:#70