Skip to content

scrapinghub/scrapy-monkeylearn

 
 

Repository files navigation

scrapy-monkeylearn Build Status

A Scrapy pipeline to categorize items using MonkeyLearn.

Settings

     Option Name            |                         Value                         |    Example Value

------------------------------- | ----------------------------------------------------- | ------------------- MONKEYLEARN_ENABLED | Whether to enable monkeylearn extension. Default=True | True MONKEYLEARN_CLASSIFIER | The ID of the classifier. | 'cl_oFKL5wft' MONKEYLEARN_AUTH_TOKEN | The auth token. | 'TWFuIGlzIGRp...' MONKEYLEARN_CLASSIFIER_FIELDS | A list of Item text fields to use for classification. | ['title', 'description'] MONKEYLEARN_CATEGORIES_FIELD | The field where the category will be stored. | 'categories'

An example value of the MONKEYLEARN_CATEGORIES_FIELD field after classification is: [{'label': 'English', 'probability': 0.321}].

Usage

Add MonkeyLearnPipeline to your pipelines and give it an order value, e.g.:

ITEM_PIPELINES = {
    'scrapy_monkeylearn.pipelines.MonkeyLearnPipeline': 100,
}

License

Copyright (c) 2015 MonkeyLearn.

Released under the MIT license.

About

A Scrapy pipeline to categorize items using MonkeyLearn

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%