Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Text analysis api

Project Description

This is a Python client for the Bookworm natural language API, made available by Crawlica.

You can register to receive an API key at https://bookworm.crawlica.com/request_api_key/

Example usage

import tabulate
from bookworm import Bookworm


API_KEY = '...'

documents = ['De två största städerna i Sverige är Stockholm och Göteborg',
             'Donald Trump blir Barack Obamas efterträdare']

b = Bookworm(API_KEY, 'sv')
res = b.entities(documents)

for ents in res:
    data = [[ent['entity'], ent['type'], ', '.join(ent['variants'])] for ent in ents]
    print(tabulate.tabulate(data, headers=['Entity', 'Type', 'Variants']))
    print('')
Entity     Type    Variants
---------  ------  ----------
Sverige    geo     Sverige
Stockholm  geo     Stockholm
Göteborg   geo     Göteborg

Entity        Type    Variants
------------  ------  -------------
Donald Trump  person  Donald Trump
Barack Obama  person  Barack Obamas

Installation

$ pip install bookworm

Functionality currently available

  • autotag - Automatically tag documents with the best matching tags from our large database of tags.
  • wordsmash - Compare document sets to get the essence of what makes a subset special. Get the defining words and phrases.
  • entities - Extract named entities (people, organisations, and places) from each document
  • sentiment - Get a numerical representation of how positive or negative each document is
  • wordcount - Get a count of the distinct words in the documents. Declinations are grouped into the base form and stop words can be removed.
  • cluster - Automatically collect documents into groups, based on their topics, and describe those groups.
  • categorize - Automatically put documents in a set of categories that you choose. The categories are defined by topic words, but the documents need not contain any of those words, just “close” words.
Release History

Release History

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bookworm-0.2.1.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Mar 23, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting