/spinrewriter

Python bindings for SpinRewriter API.

Primary LanguagePython

Python bindings for SpinRewriter API

Spin Rewriter is an online service for spinning text (synonym substitution) that creates unique version(s) of existing text. This package provides a way to easily interact with SpinRewriter API. Usage requires an account, get one here.

Install

Install into your Python path using pip or easy_install:

$ pip install spinrewriter
$ easy_install spinrewriter

Usage

After installing it, this is how you use it:

Initialize SpinRewriter.
>>> text = u"This is the text we want to spin."
>>> from spinrewriter import SpinRewriter
>>> rewriter = SpinRewriter('username', 'api_key')

Request processed spun text with spintax.
>>> rewriter.text_with_spintax(text)
u"{This is|This really is|That is|This can be} some text that we'd {like to
|prefer to|want to|love to} spin."

Request a unique variation of processed given text.
>>> rewriter.unique_variation(text)
u"This really is some text that we'd love to spin."