nlpip


Namenlpip JSON
Version 0.1.6 PyPI version JSON
download
home_page
SummaryA natural language based unix pipeline utility
upload_time2023-03-29 13:42:27
maintainer
docs_urlNone
author
requires_python>=3.7
licenseCopyright (c) 2023 Alan Kang All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords nlp llm chatgpt openai unix pipeline
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nlpip - A natural language based unix pipeline utility

`nlpip` takes a text written in natural language as input, and performs a
specified command also written in natural language, and then outputs the result
in natural language.

Here's a demo:

<img width="600" src="https://github.com/akngs/nlpip/raw/main/nlpip.svg" alt="screen recording">

## Installation

First, you need to install `nlpip` using `pip`:

    pip install nlpip

Then, set your OpenAI's API key as an environment variable:

    export OPENAI_API_KEY=WRITE_YOUR_KEY_HERE

## How to use

`nlpip` or just `nlp` for short, provides following default commands:

- `keywords`: Extract keywords from input text
- `poem`: Write poem using input text
- `summarize`: Summarize input text
- `sentiment`: Analyze sentiment of input text

For example, if you want summarize `input.txt` and turn it into a poem, you can
run the following command:

    cat input.txt | nlp summarize | nlp poem

## How to create a new command

To create a new command, you just need to create a text file containing the
command in natural language. For example, if you want to create a command that
translates input text into French, you can create a file named
`~/.nlpip/prompts/fr.txt` in with:

    Translate into French

Then, you can run the following command:

    echo Hello | nlp fr

And you will get the following output:

    Bonjour

You may override default commands by creating a file with the same name in
`~/.nlpip/prompts/`.

## Credit

- `nlpip` is inspired by
  [Schillace Laws of Semantic AI](https://learn.microsoft.com/en-us/semantic-kernel/howto/schillacelaws).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "nlpip",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "Alan Kang <jania902@gmail.com>",
    "keywords": "nlp,llm,chatgpt,openai,unix,pipeline",
    "author": "",
    "author_email": "Alan Kang <jania902@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/0f/bd/8dfab1f0bae2ac69a27d00b556efffbdd18e5d19ce6c9eba80fea5ba5a41/nlpip-0.1.6.tar.gz",
    "platform": null,
    "description": "# nlpip - A natural language based unix pipeline utility\n\n`nlpip` takes a text written in natural language as input, and performs a\nspecified command also written in natural language, and then outputs the result\nin natural language.\n\nHere's a demo:\n\n<img width=\"600\" src=\"https://github.com/akngs/nlpip/raw/main/nlpip.svg\" alt=\"screen recording\">\n\n## Installation\n\nFirst, you need to install `nlpip` using `pip`:\n\n    pip install nlpip\n\nThen, set your OpenAI's API key as an environment variable:\n\n    export OPENAI_API_KEY=WRITE_YOUR_KEY_HERE\n\n## How to use\n\n`nlpip` or just `nlp` for short, provides following default commands:\n\n- `keywords`: Extract keywords from input text\n- `poem`: Write poem using input text\n- `summarize`: Summarize input text\n- `sentiment`: Analyze sentiment of input text\n\nFor example, if you want summarize `input.txt` and turn it into a poem, you can\nrun the following command:\n\n    cat input.txt | nlp summarize | nlp poem\n\n## How to create a new command\n\nTo create a new command, you just need to create a text file containing the\ncommand in natural language. For example, if you want to create a command that\ntranslates input text into French, you can create a file named\n`~/.nlpip/prompts/fr.txt` in with:\n\n    Translate into French\n\nThen, you can run the following command:\n\n    echo Hello | nlp fr\n\nAnd you will get the following output:\n\n    Bonjour\n\nYou may override default commands by creating a file with the same name in\n`~/.nlpip/prompts/`.\n\n## Credit\n\n- `nlpip` is inspired by\n  [Schillace Laws of Semantic AI](https://learn.microsoft.com/en-us/semantic-kernel/howto/schillacelaws).\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2023 Alan Kang All rights reserved.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A natural language based unix pipeline utility",
    "version": "0.1.6",
    "split_keywords": [
        "nlp",
        "llm",
        "chatgpt",
        "openai",
        "unix",
        "pipeline"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9bb487d482f910ea461034f85a72e2b84f098ed977b18924f1d5c35b8850321",
                "md5": "010d29016f482f2ca4b1d24b30b05165",
                "sha256": "a634bbcbd5210571d89f54484d11329da8a6ea5b3058dca2b6c79a9bf67a0c51"
            },
            "downloads": -1,
            "filename": "nlpip-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "010d29016f482f2ca4b1d24b30b05165",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5861,
            "upload_time": "2023-03-29T13:42:25",
            "upload_time_iso_8601": "2023-03-29T13:42:25.604307Z",
            "url": "https://files.pythonhosted.org/packages/e9/bb/487d482f910ea461034f85a72e2b84f098ed977b18924f1d5c35b8850321/nlpip-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0fbd8dfab1f0bae2ac69a27d00b556efffbdd18e5d19ce6c9eba80fea5ba5a41",
                "md5": "6eb6ccaa63e9c558d6dd67b4790f2664",
                "sha256": "054de198454d607a7c4e6ddea629db439ec37b96aceb27a565f6f52210af67b9"
            },
            "downloads": -1,
            "filename": "nlpip-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6eb6ccaa63e9c558d6dd67b4790f2664",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5793,
            "upload_time": "2023-03-29T13:42:27",
            "upload_time_iso_8601": "2023-03-29T13:42:27.286693Z",
            "url": "https://files.pythonhosted.org/packages/0f/bd/8dfab1f0bae2ac69a27d00b556efffbdd18e5d19ce6c9eba80fea5ba5a41/nlpip-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-29 13:42:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "nlpip"
}
        
Elapsed time: 0.04880s