{"id":19646157,"url":"https://github.com/yoctol/word-embedder","last_synced_at":"2025-04-28T15:30:29.848Z","repository":{"id":69890893,"uuid":"148451617","full_name":"Yoctol/word-embedder","owner":"Yoctol","description":"Get pretrained word embedding","archived":false,"fork":false,"pushed_at":"2018-11-15T06:57:03.000Z","size":55,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-05T09:11:12.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yoctol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-12T09:00:18.000Z","updated_at":"2020-04-01T15:34:21.000Z","dependencies_parsed_at":"2023-05-07T07:30:32.293Z","dependency_job_id":null,"html_url":"https://github.com/Yoctol/word-embedder","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fword-embedder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fword-embedder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fword-embedder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Fword-embedder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yoctol","download_url":"https://codeload.github.com/Yoctol/word-embedder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338497,"owners_count":21573567,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T14:37:07.811Z","updated_at":"2025-04-28T15:30:29.816Z","avatar_url":"https://github.com/Yoctol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# word-embedder\n\n[![travis][travis-image]][travis-url]\n[![pypi][pypi-image]][pypi-url]\n\n[travis-image]: https://img.shields.io/travis/Yoctol/word-embedder.svg?style=flat\n[travis-url]: https://travis-ci.org/Yoctol/word-embedder\n[pypi-image]: https://img.shields.io/pypi/v/word-embedder.svg?style=flat\n[pypi-url]: https://pypi.python.org/pypi/word-embedder\n\nGet pretrained word embedding\n\n\n## Installation\n\n### Requirements\n* Linux\n* Python 3.6 and up\n\n`$ pip install word-embedder`\n\n## Usage\n\n### Lookup all existed embedders\n```python\n\nfrom word_embedder import lib\n\nlib.list_all_embedders()  # returns a list of embedder name\n\n```\n\n### Use an existed embedder\n\n1. load an embedder called OHOH\n```python\n\nfrom word_embedder import lib\n\nname = 'OHOH'  # embedder name\nembedder = lib[name]\n\n```\n\n2. extract a word vector\n\n- (1) given a word 'juice' (str)\n    ```python\n\n    word = 'juice'\n    embedder[word]  # returns the corresponding word vector\n\n    # Note: if 'juice' is not in the vocabulary, \n    # OOVError would be raised.\n\n    ```\n\n- (2) given an index 3 (int)\n    ```python\n\n    index = 3\n    embedder[index]  # returns the corresponding word vector\n\n    # Note: if the index is out of range of vocabulary size,\n    # OOVError would be raised.\n\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fword-embedder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoctol%2Fword-embedder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Fword-embedder/lists"}