Uniquer, v1.1
Posted on

Utility for an increase of an uniqueness of a text.
Replacing of words to their synonyms.
Change Log
- support of a replacing of words to their synonyms;
- prepare the synonyms dictionary.
Features
- increase an uniqueness of a text:
- by a replacing of words to their synonyms via a synonyms dictionary (see below for details):
- load a dictionary to a prefix tree (trie);
- find a word by its longest prefix;
- select a synonym randomly;
- by a double translation through an interim language (source → interim → source) via Google Translate service;
- by a replacing of words to their synonyms via a synonyms dictionary (see below for details):
- prepare a synonyms dictionary on a loading:
- combine synonyms lists for same words;
- remove duplicates from synonyms lists;
- support restrictions of a replacing to synonyms:
- minimal length of a replaced word;
- minimal length of a selected synonym;
- probability of a replacing of each word;
- correspond to constraints of Google Translate service:
- split the text to chunks:
- don't cut a sentence;
- don't cut a word;
- add a delay between requests;
- split the text to chunks:
- CLI:
- input the text from stdin;
- output the text to stdout.
Synonyms Dictionary
Grammar in an EBNF:
dictionary = {record, "\n"};
record = WORD, ":", synonym list;
synonym list = WORD, {" ", WORD};
WORD = ? /[а-яё]+/ ?;
Example:
волшебник:волхв чародей кудесник маг колдун
рациональность:обоснованность здравомыслие разумность осмысленность
Screenshots
Preparation of the synonyms dictionary
