SentenceGraph


NameSentenceGraph JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/Hevia/SentenceGraph
SummaryEasily create semantic graphs from text using SentenceTransformers
upload_time2022-12-18 08:07:42
maintainer
docs_urlNone
authorHevia
requires_python>=3.8
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SentenceGraph
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Install

``` sh
pip install SentenceGraph
```

## How to use

``` python
# from SentenceGraph.core import SentenceGraph, Format, TextNodeType
# from SentenceGraph.functional import create_text_nodes
```

``` python
# sentenceGraph = SentenceGraph()
```

``` python
# SentenceGraph requires all sentences to be passed as TextNode, which is just a namedtuple containing an id and text.
# There are several ways to prepare your sentence data for SentenceGraph.

# Use the builtin helper function which will just assign sequential ids for the data. Useful for experimentation.
# sentences = ['This framework generates embeddings for each input sentence',
#     'Sentences are passed as a list of string.', 
#     'The quick brown fox jumps over the lazy dog.']

# sentences = create_text_nodes(sentences)

# # 
# sentences = [TextNode(1, 'This framework generates embeddings for each input sentence'),
#     TextNode(2, 'Sentences are passed as a list of string.'), 
#     TextNode(3,'The quick brown fox jumps over the lazy dog.')]
```

``` python
# sim_graph = sentenceGraph.createGraph(sentences)
# sim_graph
```

You can also return a graph matrix in different formats.

``` python
# sim_graph = sentenceGraph.createGraph(sentences, format=Format.Numpy)
# sim_graph
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hevia/SentenceGraph",
    "name": "SentenceGraph",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python",
    "author": "Hevia",
    "author_email": "anthony@hevia.dev",
    "download_url": "https://files.pythonhosted.org/packages/7a/44/ed5bb7c16964884d374f0d8379afec7d0bf85bf8dabb4e79b126eaa3224e/SentenceGraph-0.0.5.tar.gz",
    "platform": null,
    "description": "SentenceGraph\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n## Install\n\n``` sh\npip install SentenceGraph\n```\n\n## How to use\n\n``` python\n# from SentenceGraph.core import SentenceGraph, Format, TextNodeType\n# from SentenceGraph.functional import create_text_nodes\n```\n\n``` python\n# sentenceGraph = SentenceGraph()\n```\n\n``` python\n# SentenceGraph requires all sentences to be passed as TextNode, which is just a namedtuple containing an id and text.\n# There are several ways to prepare your sentence data for SentenceGraph.\n\n# Use the builtin helper function which will just assign sequential ids for the data. Useful for experimentation.\n# sentences = ['This framework generates embeddings for each input sentence',\n#     'Sentences are passed as a list of string.', \n#     'The quick brown fox jumps over the lazy dog.']\n\n# sentences = create_text_nodes(sentences)\n\n# # \n# sentences = [TextNode(1, 'This framework generates embeddings for each input sentence'),\n#     TextNode(2, 'Sentences are passed as a list of string.'), \n#     TextNode(3,'The quick brown fox jumps over the lazy dog.')]\n```\n\n``` python\n# sim_graph = sentenceGraph.createGraph(sentences)\n# sim_graph\n```\n\nYou can also return a graph matrix in different formats.\n\n``` python\n# sim_graph = sentenceGraph.createGraph(sentences, format=Format.Numpy)\n# sim_graph\n```\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Easily create semantic graphs from text using SentenceTransformers",
    "version": "0.0.5",
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "412339fdcfe05ada9db67bf15ee5a848",
                "sha256": "bd987cfc502a9961c37b46cb3a726886d4c7388b9bee728e0fa56da997dc82cc"
            },
            "downloads": -1,
            "filename": "SentenceGraph-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "412339fdcfe05ada9db67bf15ee5a848",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 8409,
            "upload_time": "2022-12-18T08:07:40",
            "upload_time_iso_8601": "2022-12-18T08:07:40.533731Z",
            "url": "https://files.pythonhosted.org/packages/50/54/c8d2e637dfd5eb3df2f9ab4990aaab838c3cb959302d7fbfa82977e6c824/SentenceGraph-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "ed4040389c5acb383ed6974106bb1cc8",
                "sha256": "9589cc57b477eb7e9702d8cb6d9448a7ab7d6059b30bb4d5bef0085727688e9d"
            },
            "downloads": -1,
            "filename": "SentenceGraph-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ed4040389c5acb383ed6974106bb1cc8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8564,
            "upload_time": "2022-12-18T08:07:42",
            "upload_time_iso_8601": "2022-12-18T08:07:42.108640Z",
            "url": "https://files.pythonhosted.org/packages/7a/44/ed5bb7c16964884d374f0d8379afec7d0bf85bf8dabb4e79b126eaa3224e/SentenceGraph-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-18 08:07:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Hevia",
    "github_project": "SentenceGraph",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sentencegraph"
}
        
Elapsed time: 0.08707s