{ "info": { "author": "CodeSyntax", "author_email": "fquintana@codesyntax.com", "bugtrack_url": null, "classifiers": [ "Framework :: Zope3", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "cs.tags Package Readme\n=========================\n\nOverview\n--------\n\nThis package provides an engine that allows users to assign tags to items.\n\nClouds Engine\n-------------\n\nUse this package if you want to draw tag clouds or want to retrieve othe info related to tagging.\n\n >>> from cs.tags.clouds import CloudsEngine\n\nThe clouds engine stores the tags that each user assigns to an item. Tags, users and items info is stored according a model in order to speed up retrieval. This mean that the data structures will conteins precalculated tag clouds prepeared to be drawed as fast as possible.\n\n >>> clouds_engine = CloudsEngine()\n >>> clouds_engine\n \n\nIn the beggining, the clouds engine doesn't contain anything:\n\n >>> clouds_engine.getCloud()\n ([], 0, 0)\n\nEach user can add to the engine his set of tags assignated to a given item. For this proposal, the ``update()`` method mantains the user-centric relations between items and tags:\n\n >>> clouds_engine.update(item=1, user='Nando Quintana', tags=['simple','green','energy'])\n >>> clouds_engine.update(item=2, user='Nando Quintana', tags=['complex','energy'])\n >>> clouds_engine.update(item=3, user='Erral', tags=['mineral','sources'])\n >>> clouds_engine.update(item=3, user='Nando Quintana', tags=['nuclear','power'])\n\nThe engine is now able of returning a tag cloud information, based on the updates mades until this moment:\n\n >>> clouds_engine.getCloud()\n ([('energy', 2), ('complex', 1), ('green', 1), ('mineral', 1), ('nuclear', 1), ('power', 1), ('simple', 1), ('sources', 1)], 9, 8)\n\nThe ``getCloud()`` method returns this peculiar data structure. Showed info is composed by a tag lists and two numbers. The tag list is indeed a list of tuples, that contains the string tag and the weight in the cloud. Second number means the number of tagged items, and third, the number of tags in the clouds.\n\nOptionally, you can give a maximum number of tag you want to include in your tag cloud:\n\n >>> clouds_engine.getCloud(n=5)\n ([('energy', 2), ('complex', 1), ('green', 1), ('mineral', 1), ('nuclear', 1)], 9, 5)\n\nIf you want to draw a clouds of tags, posted by a single user, you can tell the ``getCloud()`` method which is the user you want to use as filter:\n\n >>> clouds_engine.getCloud(users='Nando Quintana')\n ([('energy', 2), ('complex', 1), ('green', 1), ('nuclear', 1), ('power', 1), ('simple', 1)], 7, 6)\n\nYou can also filter the cloud by item:\n\n >>> clouds_engine.getCloud(items=3, users='Nando Quintana', n=5)\n ([('nuclear', 1), ('power', 1)], 2, 2)\n\nOr ask the engine a tag cloud in relation to a single item:\n\n >>> clouds_engine.getCloud(items=3, n=5)\n ([('mineral', 1), ('nuclear', 1), ('power', 1), ('sources', 1)], 4, 4)\n\n\nImplicit knowledge\n~~~~~~~~~~~~~~~~~~\n\nThere is more information you can extract from the engine. For example, you can draw a cloud with the tags that have been inserted in common items. Doing this, you can build implicit knowledge from the users tagging habits.\n\n >>> clouds_engine.update(item=4, user='Nando Quintana', tags=['nuclear','power'])\n >>> clouds_engine.update(item=5, user='Nando Quintana', tags=['nuclear','flower','power'])\n >>> clouds_engine.update(item=5, user='Erral', tags=['black','power'])\n\n >>> clouds_engine.getRelatedTags(tag='power')\n ([('nuclear', 3)], 3, 1)\n\nOther info you can build from the tagging behaviour is the relation between items:\n\n >>> clouds_engine.getRelatedItems(item=3)\n ([(4, 2), (5, 2)], 4, 2)\n\nSo in this example, item ``3`` has ``2`` tags in common wiht item ``4``, and other ``2`` wich item ``5``.\n\nAs in the case of tags and items, you can also discover the implicit relations between users, according to the tagging history:\n\n >>> clouds_engine.getRelatedUsers(user='Erral')\n ([('Nando Quintana', 1)], 1, 1)\n\nThe results show that ``Erral`` and ``Nando Quintana`` have a tag in common.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.codesyntax.com/public/cs.tags", "keywords": "tag clouds tagging engine", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "cs.tags", "package_url": "https://pypi.org/project/cs.tags/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/cs.tags/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.codesyntax.com/public/cs.tags" }, "release_url": "https://pypi.org/project/cs.tags/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Tagging engine. Store and draw tag clouds.", "version": "0.1.1" }, "last_serial": 788557, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3bb9f83096dd2db176e3a3d244961d43", "sha256": "4b205092f178c8af70842f5e353a8a4767b1c580782848f7ca1a4f3aef4bf0ff" }, "downloads": -1, "filename": "cs.tags-0.1.tar.gz", "has_sig": false, "md5_digest": "3bb9f83096dd2db176e3a3d244961d43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14990, "upload_time": "2008-01-29T15:17:30", "url": "https://files.pythonhosted.org/packages/84/cf/e393989879085fbc5b9351b071d1b665d757a83e8900de3bd11f40ea6d6b/cs.tags-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4a644fc9efb2efc159dc8b8b179a512e", "sha256": "ddba21e800496460cf045f3b596fb263b6eae93bcb278c3332a82603e628e05a" }, "downloads": -1, "filename": "cs.tags-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4a644fc9efb2efc159dc8b8b179a512e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15083, "upload_time": "2008-01-29T15:24:25", "url": "https://files.pythonhosted.org/packages/cf/f6/b8c445df65fb3739a9a190fe045e287113621a6cf20e1fda32997e7ff858/cs.tags-0.1.1.tar.gz" } ], "0.1dev-r233": [] }, "urls": [ { "comment_text": "", "digests": { "md5": "4a644fc9efb2efc159dc8b8b179a512e", "sha256": "ddba21e800496460cf045f3b596fb263b6eae93bcb278c3332a82603e628e05a" }, "downloads": -1, "filename": "cs.tags-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4a644fc9efb2efc159dc8b8b179a512e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15083, "upload_time": "2008-01-29T15:24:25", "url": "https://files.pythonhosted.org/packages/cf/f6/b8c445df65fb3739a9a190fe045e287113621a6cf20e1fda32997e7ff858/cs.tags-0.1.1.tar.gz" } ] }