conlang-gpt


Nameconlang-gpt JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/clabe45/conlang-gpt
SummaryChatGPT language generator and translator
upload_time2023-07-13 17:00:18
maintainer
docs_urlNone
authorCaleb Sacks
requires_python>=3.11,<4.0
licenseMIT
keywords conlang chatgpt gpt 4 openai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Conlang GPT

Conlang GPT is a command line tool for creating, modifying and using constructed languages, powered by ChatGPT

## Features

> :warning: This tool is in early development. It is not ready for production use.

| Feature | Status |
| --- | --- |
| Automatically generate specifications for written or spoken languages | :sparkles: Alpha |
| Automatically or manually improve language specs iteratively | :sparkles: Alpha |
| Translate any text to or from the generated languages | :sparkles: Alpha |
| Generate vocabulary lazily | :sparkles: Alpha |
| Automatically update vocabulary when language specs change | :sparkles: Alpha |
| Support for all of OpenAI's chat models | :sparkles: Alpha |

## Installation

```
pip install conlang-gpt
```

## Anatomy of a Language

Languages are represented as two files:
- **Guide**: The purpose of the language guide is to describe how to use the language, including rules related to grammar and phonetics.
- **Dictionary**: The dictionary contains the vocabulary for the language. It is built up lazily as more and more text is translated.

## Commands

### Overview

Conlang GPT provides several commands:

```
$ conlang --help
Usage: conlang [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  create     Create a constructed language.
  improve    Automatically improve the language.
  modify     Make specific changes to the language.
  translate  Translate text to or from a constructed language.
```

Before running any of them, set the `OPENAI_API_KEY` environment variable (keep the space in front to exclude the command from your history):

```
 export OPENAI_API_KEY=sk...
```

### `conlang create`

Creates the first draft of a guide for a new language and writes it to a file.

```
$ conlang create --help
Usage: conlang create [OPTIONS]

  Create a constructed language.

Options:
  --design-goals TEXT
  --guide TEXT
  --model TEXT         OpenAI model to use. Defaults to gpt-3.5-turbo.
  --help               Show this message and exit.
```

### `conlang improve`

Attempts to automatically improve the language guide and dictionary. The resulting guide and dictionary are saved to the original input files.

```
$ conlang improve --help
Usage: conlang improve [OPTIONS]

  Automatically improve the language.

Options:
  --guide TEXT
  --dictionary TEXT             Enter the filename of the dictionary to use in
                                'example' mode.
  --max-iterations INTEGER      Max number of revisions to perform. Defaults
                                to 5.
  --similarity-threshold FLOAT  Maximum similarity between two words to be
                                considered the same. Defaults to 0.98.
  --model TEXT                  OpenAI model to use. Defaults to
                                gpt-3.5-turbo.
  --embeddings-model TEXT       OpenAI model to use for word embeddings in
                                'example' mode. Defaults to text-embedding-
                                ada-002.
  --help                        Show this message and exit.
```

### `conlang modify`

Makes a specific change to the language and updates the guide and dictionary.

```
$ conlang modify --help
Usage: conlang modify [OPTIONS]

  Make specific changes to the language.

Options:
  --guide TEXT
  --dictionary TEXT             Enter the filename of the dictionary to use in
                                'example' mode.
  --changes TEXT
  --similarity-threshold FLOAT  Maximum similarity between two words to be
                                considered the same. Defaults to 0.98.
  --model TEXT                  OpenAI model to use. Defaults to
                                gpt-3.5-turbo.
  --embeddings-model TEXT       OpenAI model to use for word embeddings in
                                'example' mode. Defaults to text-embedding-
                                ada-002.
  --help                        Show this message and exit.
```

### `conlang translate`

Translates text between any language ChatGPT was trained on to and the conlang. The language of the input text is automatically detected and used to dermine which language to translate to. If any problems are encountered while translating, the guide and dictionary will be repeatedly fixed until `--max-improvements` is reached.

```
$ conlang translate --help
Usage: conlang translate [OPTIONS]

  Translate text to or from a constructed language.

Options:
  --guide TEXT
  --dictionary TEXT
  --text TEXT
  --max-improvements INTEGER    Max number of relevant improvements to make to
                                the guide and dictionary. Defaults to 5.
  --similarity-threshold FLOAT  Maximum similarity between two words to be
                                considered the same. Defaults to 0.98.
  --model TEXT                  OpenAI model to use
  --embedding-model TEXT        OpenAI model to use for word embeddings
  --help                        Show this message and exit.
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/clabe45/conlang-gpt",
    "name": "conlang-gpt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "conlang,chatgpt,gpt 4,openai",
    "author": "Caleb Sacks",
    "author_email": "16855387+clabe45@users.noreply.github.com",
    "download_url": "https://files.pythonhosted.org/packages/5f/74/fe0bdec2f9a0d88d5eb5badedb19164b44603859e2bc62bd7df6bd2d77ee/conlang_gpt-0.3.0.tar.gz",
    "platform": null,
    "description": "# Conlang GPT\n\nConlang GPT is a command line tool for creating, modifying and using constructed languages, powered by ChatGPT\n\n## Features\n\n> :warning: This tool is in early development. It is not ready for production use.\n\n| Feature | Status |\n| --- | --- |\n| Automatically generate specifications for written or spoken languages | :sparkles: Alpha |\n| Automatically or manually improve language specs iteratively | :sparkles: Alpha |\n| Translate any text to or from the generated languages | :sparkles: Alpha |\n| Generate vocabulary lazily | :sparkles: Alpha |\n| Automatically update vocabulary when language specs change | :sparkles: Alpha |\n| Support for all of OpenAI's chat models | :sparkles: Alpha |\n\n## Installation\n\n```\npip install conlang-gpt\n```\n\n## Anatomy of a Language\n\nLanguages are represented as two files:\n- **Guide**: The purpose of the language guide is to describe how to use the language, including rules related to grammar and phonetics.\n- **Dictionary**: The dictionary contains the vocabulary for the language. It is built up lazily as more and more text is translated.\n\n## Commands\n\n### Overview\n\nConlang GPT provides several commands:\n\n```\n$ conlang --help\nUsage: conlang [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  create     Create a constructed language.\n  improve    Automatically improve the language.\n  modify     Make specific changes to the language.\n  translate  Translate text to or from a constructed language.\n```\n\nBefore running any of them, set the `OPENAI_API_KEY` environment variable (keep the space in front to exclude the command from your history):\n\n```\n export OPENAI_API_KEY=sk...\n```\n\n### `conlang create`\n\nCreates the first draft of a guide for a new language and writes it to a file.\n\n```\n$ conlang create --help\nUsage: conlang create [OPTIONS]\n\n  Create a constructed language.\n\nOptions:\n  --design-goals TEXT\n  --guide TEXT\n  --model TEXT         OpenAI model to use. Defaults to gpt-3.5-turbo.\n  --help               Show this message and exit.\n```\n\n### `conlang improve`\n\nAttempts to automatically improve the language guide and dictionary. The resulting guide and dictionary are saved to the original input files.\n\n```\n$ conlang improve --help\nUsage: conlang improve [OPTIONS]\n\n  Automatically improve the language.\n\nOptions:\n  --guide TEXT\n  --dictionary TEXT             Enter the filename of the dictionary to use in\n                                'example' mode.\n  --max-iterations INTEGER      Max number of revisions to perform. Defaults\n                                to 5.\n  --similarity-threshold FLOAT  Maximum similarity between two words to be\n                                considered the same. Defaults to 0.98.\n  --model TEXT                  OpenAI model to use. Defaults to\n                                gpt-3.5-turbo.\n  --embeddings-model TEXT       OpenAI model to use for word embeddings in\n                                'example' mode. Defaults to text-embedding-\n                                ada-002.\n  --help                        Show this message and exit.\n```\n\n### `conlang modify`\n\nMakes a specific change to the language and updates the guide and dictionary.\n\n```\n$ conlang modify --help\nUsage: conlang modify [OPTIONS]\n\n  Make specific changes to the language.\n\nOptions:\n  --guide TEXT\n  --dictionary TEXT             Enter the filename of the dictionary to use in\n                                'example' mode.\n  --changes TEXT\n  --similarity-threshold FLOAT  Maximum similarity between two words to be\n                                considered the same. Defaults to 0.98.\n  --model TEXT                  OpenAI model to use. Defaults to\n                                gpt-3.5-turbo.\n  --embeddings-model TEXT       OpenAI model to use for word embeddings in\n                                'example' mode. Defaults to text-embedding-\n                                ada-002.\n  --help                        Show this message and exit.\n```\n\n### `conlang translate`\n\nTranslates text between any language ChatGPT was trained on to and the conlang. The language of the input text is automatically detected and used to dermine which language to translate to. If any problems are encountered while translating, the guide and dictionary will be repeatedly fixed until `--max-improvements` is reached.\n\n```\n$ conlang translate --help\nUsage: conlang translate [OPTIONS]\n\n  Translate text to or from a constructed language.\n\nOptions:\n  --guide TEXT\n  --dictionary TEXT\n  --text TEXT\n  --max-improvements INTEGER    Max number of relevant improvements to make to\n                                the guide and dictionary. Defaults to 5.\n  --similarity-threshold FLOAT  Maximum similarity between two words to be\n                                considered the same. Defaults to 0.98.\n  --model TEXT                  OpenAI model to use\n  --embedding-model TEXT        OpenAI model to use for word embeddings\n  --help                        Show this message and exit.\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ChatGPT language generator and translator",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/clabe45/conlang-gpt"
    },
    "split_keywords": [
        "conlang",
        "chatgpt",
        "gpt 4",
        "openai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68e11215719f7ed88f6025d03bb77689c7e0a837d00934c0e9541cda1bbfaec6",
                "md5": "11a09b864cd52c97e3e5e12409b2ee1e",
                "sha256": "8a5f15caf3d28c2c34ecf722209f3f5cdaae733ce730eae0066a3f8073b10664"
            },
            "downloads": -1,
            "filename": "conlang_gpt-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "11a09b864cd52c97e3e5e12409b2ee1e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 13245,
            "upload_time": "2023-07-13T17:00:16",
            "upload_time_iso_8601": "2023-07-13T17:00:16.859464Z",
            "url": "https://files.pythonhosted.org/packages/68/e1/1215719f7ed88f6025d03bb77689c7e0a837d00934c0e9541cda1bbfaec6/conlang_gpt-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f74fe0bdec2f9a0d88d5eb5badedb19164b44603859e2bc62bd7df6bd2d77ee",
                "md5": "2b5c32973eb2496dda0e6f13741707fd",
                "sha256": "2322724a5d8689c0f9984fb8708cb7549ef4a9322ded577e1763c940c45071b8"
            },
            "downloads": -1,
            "filename": "conlang_gpt-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2b5c32973eb2496dda0e6f13741707fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 10812,
            "upload_time": "2023-07-13T17:00:18",
            "upload_time_iso_8601": "2023-07-13T17:00:18.464806Z",
            "url": "https://files.pythonhosted.org/packages/5f/74/fe0bdec2f9a0d88d5eb5badedb19164b44603859e2bc62bd7df6bd2d77ee/conlang_gpt-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-13 17:00:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "clabe45",
    "github_project": "conlang-gpt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "conlang-gpt"
}
        
Elapsed time: 0.19574s