ONION
Description
ONION (ONe Instance ONly) is a tool for removing duplicate parts from large collections of texts. The tool has been implemented in Python, licensed under New BSD License and made an open source software (available for download including the source code at http://code.google.com/p/onion/). It is being successfuly used for cleaning large textual corpora at Natural language processing centre at Faculty of informatics, Masaryk university Brno and it's industry partners. The research leading to this piece of software was published in author's Ph.D. thesis "Removing Boilerplate and Duplicate Content from Web Corpora". The deduplication algorithm is based on comparing n-grams of words of text. The author's algorithm has been shown to be more suitable for textual corpora deduplication than competing algorithms (Broder, Charikar): in addition to detection of identical or very similar (95 %) duplicates, it is able to detect even partially similar duplicates (50 %) still achieving great performace (further described in author's Ph.D. thesis). The unique deduplication capabilities and scalability of the algorithm were been demonstrated while building corpora of American Spanish, Arabic, Czech, French, Japanese, Russian, Tajik, and six Turkic languages consisting --- several TB of text documents were deduplicated resulting in corpora of 70 billions tokens altogether.
How to use the tool
onion [OPTIONS] [FILE]
Mark duplicate text parts in the input vertical file.
-f FILE hashes of duplicate n-grams -n NUM n-gram length (default: 5) -t NUM duplicate content threshold (default: 0.5) -d STR document tag (default: doc) -p STR paragraph tag (default: p) -s strip duplicate parts (rather than mark) -m no smoothing -T NUM trim n-gram hashes to NUM bits (default: 64) -l NUM max stub length (default: 20) -b NUM buffer size, in bytes (default: 16777216) -q quiet; suppress all output except for errors -V print version information and exit -h display this help and exit
With no FILE, or when FILE is -, read standard input. Output is written to standard output
Source
https://corpus.tools/wiki/Onion
Acknowledgements
This software has been developed at the Natural Language Processing Centre of Masaryk University in Brno with financial support from PRESEMT and Lexical Computing Ltd. It also relates to Jan Pomikálek's PhD research.
If you use the system, please cite the related publication as well as the LINDAT/CLARIAH infrastructure: http://hdl.handle.net/11858/00-097C-0000-000D-F67B-7
@phdthesis{pomikalek2011removing, title={Removing boilerplate and duplicate content from web corpora}, author={Pomik{\'a}lek, Jan}, school={Masaryk university, Faculty of informatics, Brno, Czech Republic}, year={2011}
License
Onion is licensed under the BSD 3-Clause License