{"id":19900011,"url":"https://github.com/scrapy-plugins/scrapy-monkeylearn","last_synced_at":"2025-05-02T22:32:06.663Z","repository":{"id":28105669,"uuid":"31604051","full_name":"scrapy-plugins/scrapy-monkeylearn","owner":"scrapy-plugins","description":"A Scrapy pipeline to categorize items using MonkeyLearn","archived":false,"fork":false,"pushed_at":"2017-04-28T12:51:05.000Z","size":44,"stargazers_count":38,"open_issues_count":0,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-07T08:02:05.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scrapy-plugins.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-03T15:00:34.000Z","updated_at":"2025-02-09T08:45:07.000Z","dependencies_parsed_at":"2022-07-08T13:48:15.355Z","dependency_job_id":null,"html_url":"https://github.com/scrapy-plugins/scrapy-monkeylearn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-monkeylearn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-monkeylearn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-monkeylearn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-monkeylearn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrapy-plugins","download_url":"https://codeload.github.com/scrapy-plugins/scrapy-monkeylearn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252116449,"owners_count":21697381,"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-12T20:10:49.715Z","updated_at":"2025-05-02T22:32:05.302Z","avatar_url":"https://github.com/scrapy-plugins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"scrapy-monkeylearn\n==================\n\nA `Scrapy`_ pipeline to categorize items using `MonkeyLearn`_.\n\nSettings\n--------\n\nMONKEYLEARN_BATCH_SIZE\n~~~~~~~~~~~~~~~~~~~~~~\n\nThe size of the item batches sent to MonkeyLearn.\n\nDefault: ``200``\n\nExample:\n\n.. code-block:: python\n\n   MONKEYLEARN_BATCH_SIZE = 200\n\nMONKEYLEARN_MODULE\n~~~~~~~~~~~~~~~~~~\n\nThe ID of the monkeylearn module.\n\nExample:\n\n.. code-block:: python\n\n    MONKEYLEARN_MODULE = 'cl_oFKL5wft'\n\nMONKEYLEARN_USE_SANDBOX\n~~~~~~~~~~~~~~~~~~~~~~~\n\nIn case of using a classifier, if the sandbox version should be used.\n\nDefault: ``False``\n\nExample:\n\n.. code-block:: python\n\n    MONKEYLEARN_USE_SANDBOX = True\n\nMONKEYLEARN_TOKEN\n~~~~~~~~~~~~~~~~~\n\nThe auth token.\n\nExample:\n\n.. code-block:: python\n\n    MONKEYLEARN_TOKEN = 'TWFuIGlzIGRp...'\n\nMONKEYLEARN_FIELD_TO_PROCESS\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA field or list of Item text fields to use for classification.\nAlso comma-separated string with field names is supported.\n\nExample:\n\n.. code-block:: python\n\n    MONKEYLEARN_FIELD_TO_PROCESS = 'title'\n\n.. code-block:: python\n\n    MONKEYLEARN_FIELD_TO_PROCESS = ['title', 'description']\n\n.. code-block:: python\n\n    MONKEYLEARN_FIELD_TO_PROCESS = 'title,description'\n\nMONKEYLEARN_FIELD_OUTPUT\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe field where the MonkeyLearn output will be stored.\n\nExample:\n\n.. code-block:: python\n\n    MONKEYLEARN_FIELD_OUTPUT = 'categories'\n\n\nAn example value of the `MONKEYLEARN_FIELD_OUTPUT` field after classification is:\n\n.. code-block:: python\n\n    [{'label': 'English', 'probability': 0.321}]\n\nUsage\n-----\n\nIn your *settings.py* file, add the previously described settings and add ``MonkeyLearnPipeline`` to your pipelines, e.g.:\n\n.. code-block:: python\n\n    ITEM_PIPELINES = {\n        'scrapy_monkeylearn.pipelines.MonkeyLearnPipeline': 100,\n    }\n\nLicense\n-------\n\nCopyright (c) 2015 `MonkeyLearn`_.\n\nReleased under the MIT license.\n\n.. _Scrapy: http://scrapy.org/\n.. _MonkeyLearn: http://www.monkeylearn.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrapy-plugins%2Fscrapy-monkeylearn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrapy-plugins%2Fscrapy-monkeylearn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrapy-plugins%2Fscrapy-monkeylearn/lists"}