{ "info": { "author": "Multiple authors", "author_email": "tiberiu44@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.0" ], "description": "# Tripod\n\nTripod is a tool/ML model for computing latent representations for large sequences. It has been used on source code and text and it has applications such as:\n* Malicious code detection\n* Sentiment analysis\n* Information/code indexing and retrieval\n* Anomaly Detection/ Unsupervised Learning\n\n**For a quick demo** you can try the [Colaboratory Notebook with GPU acceleration](https://colab.research.google.com/drive/1_Qb8-KgIlpXwNtN5TdmBikEelN7djWaL). If you want to modify the text, open the Notebook in playground mode.\n\nLink to white paper will be available soon.\n\n\n**Note:** With minor modifications, you can apply the same model to images and audio\n\n## Quick start guide\n\nThe fastest way to get started with Tripod is to use the precompiled PIP package. Make sure you have python3 and pip installed and use the following command:\n\n```bash\n$ pip3 install tripod-ml\n```\n\nRequirements:\n* python3 \n* installed dependencies (requirements.txt)\n## Usage\n\nTripod comes with an easy to use API. After downloading the pip package:\n\n\n```python\nfrom tripod.api import Tripod\ntripod=Tripod()\ntripod.load('wiki-103')\nexamples=['Science (from the Latin word scientia, meaning \"knowledge\")[1] is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe.', 'Their contributions to mathematics, astronomy, and medicine entered and shaped Greek natural philosophy of classical antiquity, whereby formal attempts were made to provide explanations of events in the physical world based on natural causes', 'Bucharest is the capital and largest city of Romania, as well as its cultural, industrial, and financial centre. It is located in the southeast of the country', 'The city proper is administratively known as the \"City\"), and has the same administrative level as that of a national county, being further subdivided into six sectors, each governed by a local mayor.']\n\nfrom scipy import spatial\n\nfor ii in range(len(examples)):\n for jj in range(ii+1, len(examples)):\n s=1 - spatial.distance.cosine(rez[ii], rez[jj])\n s_sum=1 - spatial.distance.cosine(rez[ii][0:300], rez[jj][0:300])\n s_gst=1 - spatial.distance.cosine(rez[ii][300:600], rez[jj][300:600])\n s_mem=1 - spatial.distance.cosine(rez[ii][600:900], rez[jj][600:900])\n print (examples[ii]+'\\n\\n'+examples[jj])\n print ('{0} {1} {2} {3}'.format(s, s_sum, s_gst, s_mem))\n print('\\n\\n\\n')\n```\n\nThe output should look like this:\n\n```text\nScience (from the Latin word scientia, meaning \"knowledge\")[1] is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe.\nTheir contributions to mathematics, astronomy, and medicine entered and shaped Greek natural philosophy of classical antiquity, whereby formal attempts were made to provide explanations of events in the physical world based on natural causes\n0.9855362772941589 0.9855527281761169 0.9999992847442627 0.9999362826347351\n\nScience (from the Latin word scientia, meaning \"knowledge\")[1] is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe.\nBucharest is the capital and largest city of Romania, as well as its cultural, industrial, and financial centre. It is located in the southeast of the country\n-0.8141930103302002 -0.9598744511604309 0.8627750873565674 0.8763532042503357\n\nScience (from the Latin word scientia, meaning \"knowledge\")[1] is a systematic enterprise that builds and organizes knowledge in the form of testable explanations and predictions about the universe.\nThe city proper is administratively known as the \"City\"), and has the same administrative level as that of a national county, being further subdivided into six sectors, each governed by a local mayor.\n-0.813877522945404 -0.9543831944465637 0.7057918310165405 0.5757448673248291\n\nTheir contributions to mathematics, astronomy, and medicine entered and shaped Greek natural philosophy of classical antiquity, whereby formal attempts were made to provide explanations of events in the physical world based on natural causes\nBucharest is the capital and largest city of Romania, as well as its cultural, industrial, and financial centre. It is located in the southeast of the country\n-0.8484337329864502 -0.9655283689498901 0.8628923892974854 0.8798920512199402\n\nTheir contributions to mathematics, astronomy, and medicine entered and shaped Greek natural philosophy of classical antiquity, whereby formal attempts were made to provide explanations of events in the physical world based on natural causes\nThe city proper is administratively known as the \"City\"), and has the same administrative level as that of a national county, being further subdivided into six sectors, each governed by a local mayor.\n-0.8573421239852905 -0.9712408185005188 0.705249011516571 0.568310558795929\n\nBucharest is the capital and largest city of Romania, as well as its cultural, industrial, and financial centre. It is located in the southeast of the country\nThe city proper is administratively known as the \"City\"), and has the same administrative level as that of a national county, being further subdivided into six sectors, each governed by a local mayor.\n0.9749458432197571 0.9925230145454407 0.48334062099456787 0.39682143926620483\n\n```\n\nThe four values represent: overall cosine distance, summary-based cosine distance, GST-based cosine distance and memory-based cosine distance. \n\n\n## Training you own models\n\nThis chapter is still under development\n\n### Licensing\n\nThis project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adobe/tripod", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tripod-ml", "package_url": "https://pypi.org/project/tripod-ml/", "platform": "", "project_url": "https://pypi.org/project/tripod-ml/", "project_urls": { "Homepage": "https://github.com/adobe/tripod" }, "release_url": "https://pypi.org/project/tripod-ml/0.1.0.4/", "requires_dist": [ "torch", "tqdm", "numpy", "bpe", "requests", "sklearn", "joblib" ], "requires_python": "", "summary": "Machine Learning tool for extracting latent representations from long sequences", "version": "0.1.0.4" }, "last_serial": 5850397, "releases": { "0.1.0.1": [ { "comment_text": "", "digests": { "md5": "1a723b0a5dde7b67e242d4fc88e45076", "sha256": "bae41cd21dd9c80fcff2d5431ffeb64a8f81dbb6051d2054affc7d5484e8e26c" }, "downloads": -1, "filename": "tripod_ml-0.1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "1a723b0a5dde7b67e242d4fc88e45076", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20158, "upload_time": "2019-09-17T14:25:24", "url": "https://files.pythonhosted.org/packages/ae/41/1d53f6e8daf3dc6a30d275e363dc1356cb01409506a8fea3ce43876a01da/tripod_ml-0.1.0.1-py3-none-any.whl" } ], "0.1.0.2": [ { "comment_text": "", "digests": { "md5": "cd9e60554ed5245675e0d590483bcba0", "sha256": "9458a51db49f1f110fd3dde23af2ab26d281979c479fdf2532ae79ab93a144ac" }, "downloads": -1, "filename": "tripod_ml-0.1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "cd9e60554ed5245675e0d590483bcba0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20372, "upload_time": "2019-09-18T08:07:45", "url": "https://files.pythonhosted.org/packages/3b/88/f3e39e48dd7b1a789f406905cf758bf137d4154aea8bd92706b61dd3698f/tripod_ml-0.1.0.2-py3-none-any.whl" } ], "0.1.0.3": [ { "comment_text": "", "digests": { "md5": "c9d2756e5f86ce7f8dc5445dbec6af71", "sha256": "e6de9895d6f1d663656894e05473e81c2bbfea9549a66ab4c988b8ae6cac3292" }, "downloads": -1, "filename": "tripod_ml-0.1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "c9d2756e5f86ce7f8dc5445dbec6af71", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20378, "upload_time": "2019-09-18T08:28:27", "url": "https://files.pythonhosted.org/packages/01/1e/3db52bacc438d10d42cb8b729246968829352d130f191a01f77386a90997/tripod_ml-0.1.0.3-py3-none-any.whl" } ], "0.1.0.4": [ { "comment_text": "", "digests": { "md5": "d44847c20f9605d0efa23752633b569a", "sha256": "259b87a796fbcd0e803bad059a274d846a71d51bd5760c6be9612ff107fbb518" }, "downloads": -1, "filename": "tripod_ml-0.1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d44847c20f9605d0efa23752633b569a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20414, "upload_time": "2019-09-18T11:09:10", "url": "https://files.pythonhosted.org/packages/04/e9/92354ff5fca52b24b4e4bdd1a010cbcbca2418cf2cb7d8996a21f21f2d4a/tripod_ml-0.1.0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d44847c20f9605d0efa23752633b569a", "sha256": "259b87a796fbcd0e803bad059a274d846a71d51bd5760c6be9612ff107fbb518" }, "downloads": -1, "filename": "tripod_ml-0.1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "d44847c20f9605d0efa23752633b569a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 20414, "upload_time": "2019-09-18T11:09:10", "url": "https://files.pythonhosted.org/packages/04/e9/92354ff5fca52b24b4e4bdd1a010cbcbca2418cf2cb7d8996a21f21f2d4a/tripod_ml-0.1.0.4-py3-none-any.whl" } ] }