https://github.com/mouse-reeve/rewordbot
The thesaurus makes you sound smarter
https://github.com/mouse-reeve/rewordbot
generative-text natural-language synonyms wordnik
Last synced: about 1 year ago
JSON representation
The thesaurus makes you sound smarter
- Host: GitHub
- URL: https://github.com/mouse-reeve/rewordbot
- Owner: mouse-reeve
- License: mit
- Created: 2016-12-27T17:01:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T20:44:37.000Z (about 9 years ago)
- Last Synced: 2025-01-08T11:17:46.462Z (over 1 year ago)
- Topics: generative-text, natural-language, synonyms, wordnik
- Language: Python
- Homepage:
- Size: 76.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Re-Word Bot
Replace words in a piece of text with a synonym (via [Wordnik](wordnik.com)), and make some effort to retain the orginal formatting.
Examples:
Convert text:
```bash
$ python synonymizer.py -t 'The thesaurus makes you sound smarter'
The synonymicon mate you healthy smarter
```
Show the tokenization and part of speech tagging:
```bash
$ python synonymizer.py -t 'The thesaurus makes you sound smarter' --show_tokens=true
[('The', 'DT'), ('thesaurus', 'NN'), ('makes', 'VBZ'), ('you', 'PRP'), ('sound', 'VBP'), ('smarter', 'NN')]
The thesaurus cause you healthy smarter
```
Load a text file:
```bash
$ python synonymizer.py -f file-to-convert.txt
```
Use as a python class:
```python
from synonymizer import Reword
print Reword().reword('The thesaurus makes you sound smarter')
# u'The synonymicon cause you strong smarter'
```