Coder Social home page Coder Social logo

mergedict's Introduction

Mergedict

Merge multiple dictionaries/word lists into one while preserving the order Unlike cat file1 file2 file3 | sort -u > outputfile, this program preserves the order. So if your word lists are ordered by frequency, then this is the tool to preserve that order.

Building

clang++ -O3 -std=c++23 -stdlib=libc++ main.cpp -o main

Usage

./main <file 1> [<file 2> ...] <outputfile>

Will create outputfile and add any words from the previously listed files, while ignoring duplicate entries. The files listed earlier will get their contents appended to the output file first, so if you have a mix of word lists with both ordered by frequency and ordered alphabetical, then place the files with the frequency ordering first.

You can use a single file as input to remove duplicates from that file only. In that case the first occurrence gets written out first while any subsequent ones are ignored.

If outputfile exists, then the program will not run and print an error.

Limitations

This program uses an in memory std::unordered_set<std::string> for caching. It should work fine with large word lists like rockyou.txt (140 MB) as long as you have enough ram.

Extremely large lists, like crackstation-all (15 GB) may not work unless you have a beefy system.

mergedict's People

Contributors

falcoger avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.