Please write a C++ code that can read all text file content in the directory, find which…
- User
Please write a C++ code that can read all text file content in the directory, find which file is similar to which file based on content, and then make a file that has content from both files. You may use the most suitable coding language in terms of speed, complexity, application areas, etc. Use multiple code snippets when a point is beyond a single code snippet. You may use advanced techniques. You may use third-party libraries or implement additional functionality when needed. When you are unable to write a code about at least one of the raised points, please mention it to me.
The code MUST be able to do the 21 points raised below:
1- Read sub-folders and find at least 3 similar lines before merging. 2- Not miss any lines or paragraphs. 3- Read more than 3000 files. 4- Be efficient, readable, and have standardized headers for different modules. 5- Not use a single identifier for multiple purposes. 6- Formalize exception handling and handle operation errors. 7- Be fast when reading large files or a large number of files. 8- Work even if there are files other than text files. 9- Handle cases where input and output directories are invalid or inaccessible. 10- Handle cases where the output file already exists. 11- Handle cases where the input directory is empty and contains sub-directories that cannot be accessed. 12- Handle cases where input and output directories are not on the same drive and are not accessible. 13- Handle cases where the merged file already exists in the output. 14- Check for partial matches or variations in formatting along with exact matches between files. 15- Prioritize files with similar names to one another. 16- Have external sorting algorithms like merge sort. 17- Have a library like ICU to detect and convert the encodings and endings to a common format before comparing the file contents. 18- Have techniques like fuzzy matching or natural language processing to identify similar content even if the files have different structures. 19- Use external libraries like NLTK or spaCy for natural language processing tasks like tokenization and named entity recognition
- Assistant