clip-similarwords


Nameclip-similarwords JSON
Version 0.0.4.1 PyPI version JSON
download
home_pagehttps://github.com/nazodane/clip_similarwords
Summaryfinding similar 1-token words on OpenAI's CLIP.
upload_time2022-12-22 16:27:11
maintainer
docs_urlNone
authorToshimitsu Kimura
requires_python>=3.10.0
licenseMIT
keywords clip
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            The clip_similarwords is the implementation of finding similar 1-token words of OpenAI's [CLIP](https://github.com/openai/CLIP) in less than one second. 

OpenAI's CLIP uses text-image similarities so its text-text similarities may also be text's typical image similarities unlike [WordNet](https://en.wikipedia.org/wiki/WordNet) or other synonym dictionaries.

Note that, for speed and storage reason (PyPI is limited to 60MB), the words composed by 2 or more tokens are not supported. 

Installation
============
clip_similarwords is easily installable via pip command:
```bash
pip install clip_similarwords
```
or
```bash
pip install git+https://github.com/nazodane/clip_similarwords.git
```

Usage of the command
====================
```bash
~/.local/bin/clip-similarwords [ word_fragment | --all ]
```

Usage of the module
===================
```python
from clip_similarwords import CLIPTextSimilarWords
clipsim = CLIPTextSimilarWords()
for key_token, sim_token, cos_similarity in clipsim("cat"):
    print("%s -> %s ( cos_similarity: %.2f )"%(key_token, sim_token, cos_similarity))
```

Requirements for model uses
===========================
* Linux (should also works on other environmets)

no PyTorch nor CUDA are required.

Requirements for model generation
=================================
* Linux
* Python 3.10 or later
* PyTorch 1.13 or later
* CUDA 11.7 or later
* DRAM 16GB or higher
* RTX 3060 12GB or higher

The patches and informations on other enviroments are surely welcome!

License
=======
The codes are under MIT License. The model was converted under Japanese law.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/nazodane/clip_similarwords",
    "name": "clip-similarwords",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10.0",
    "maintainer_email": "",
    "keywords": "clip",
    "author": "Toshimitsu Kimura",
    "author_email": "lovesyao@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c0/cb/2dd0e347be71e2f88c076203a24f002773275d8cf1bb6e8960a2469cd6ba/clip_similarwords-0.0.4.1.tar.gz",
    "platform": null,
    "description": "The clip_similarwords is the implementation of finding similar 1-token words of OpenAI's [CLIP](https://github.com/openai/CLIP) in less than one second. \n\nOpenAI's CLIP uses text-image similarities so its text-text similarities may also be text's typical image similarities unlike [WordNet](https://en.wikipedia.org/wiki/WordNet) or other synonym dictionaries.\n\nNote that, for speed and storage reason (PyPI is limited to 60MB), the words composed by 2 or more tokens are not supported. \n\nInstallation\n============\nclip_similarwords is easily installable via pip command:\n```bash\npip install clip_similarwords\n```\nor\n```bash\npip install git+https://github.com/nazodane/clip_similarwords.git\n```\n\nUsage of the command\n====================\n```bash\n~/.local/bin/clip-similarwords [ word_fragment | --all ]\n```\n\nUsage of the module\n===================\n```python\nfrom clip_similarwords import CLIPTextSimilarWords\nclipsim = CLIPTextSimilarWords()\nfor key_token, sim_token, cos_similarity in clipsim(\"cat\"):\n    print(\"%s -> %s ( cos_similarity: %.2f )\"%(key_token, sim_token, cos_similarity))\n```\n\nRequirements for model uses\n===========================\n* Linux (should also works on other environmets)\n\nno PyTorch nor CUDA are required.\n\nRequirements for model generation\n=================================\n* Linux\n* Python 3.10 or later\n* PyTorch 1.13 or later\n* CUDA 11.7 or later\n* DRAM 16GB or higher\n* RTX 3060 12GB or higher\n\nThe patches and informations on other enviroments are surely welcome!\n\nLicense\n=======\nThe codes are under MIT License. The model was converted under Japanese law.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "finding similar 1-token words on OpenAI's CLIP.",
    "version": "0.0.4.1",
    "split_keywords": [
        "clip"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4648d43f8619ae4775542e0de4bd14d1",
                "sha256": "ba70a5003c1d547489846d371442e445c1a2355d809cfda67689cdaff85cfb87"
            },
            "downloads": -1,
            "filename": "clip_similarwords-0.0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4648d43f8619ae4775542e0de4bd14d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10.0",
            "size": 8248362,
            "upload_time": "2022-12-22T16:26:57",
            "upload_time_iso_8601": "2022-12-22T16:26:57.351990Z",
            "url": "https://files.pythonhosted.org/packages/f3/24/076e9bf05d4030e97b2b28c280fcac714237e70d1ab57f80293a20e7a82a/clip_similarwords-0.0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "267f72fe2c541671b36ce4bf8f1185e2",
                "sha256": "ee5868804402b0c2708ef323b704e0861b50c88e6c546922aa8fef5c983e39a7"
            },
            "downloads": -1,
            "filename": "clip_similarwords-0.0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "267f72fe2c541671b36ce4bf8f1185e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10.0",
            "size": 8034931,
            "upload_time": "2022-12-22T16:27:11",
            "upload_time_iso_8601": "2022-12-22T16:27:11.751973Z",
            "url": "https://files.pythonhosted.org/packages/c0/cb/2dd0e347be71e2f88c076203a24f002773275d8cf1bb6e8960a2469cd6ba/clip_similarwords-0.0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-22 16:27:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "nazodane",
    "github_project": "clip_similarwords",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "clip-similarwords"
}
        
Elapsed time: 0.07022s