Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A Text Comprehension Engine in Python.

Project Description

A Text Comprehension Engine in Python

Build Status

What is Cahoots?

Cahoots is software that attempts to categorize snippets of text into one of several categories. It runs a series of parsers, and returns a list of potential datatypes and interpretations with confidence values. In short, it attempts to “comprehend” the snippet you provide.

Its ideal use is within a daemon or service with a long life/execution time. It can also be run as a standalone Cahoots server (detailed here).

What is Cahoots NOT?

Cahoots is not meant for diagramming and mining large sets of text. While a text mining engine could utilize Cahoots in order to target specific snippets that it mined out of a large set of text, Cahoots is not meant to mine text.

Cahoots is not software that you would integrate into a non-daemon web app that would bootstrap and instantiate it on every page view. The bootstrap process can be somewhat intensive and should only run once (during an application’s launch process).

Installation

sudo pip install cahoots

Basic Module Usage

>>> from cahoots.parser import CahootsParser
>>> cahoots = CahootsParser(bootstrap=True)
>>> results = cahoots.parse('http://www.google.com/')
>>> results
{
    'date': '2015-03-22T23:47:36.340187',
    'query': 'http://www.google.com/',
    'top': <cahoots.result.ParseResult object>,
    'results': {
        'count': 1,
        'matches': [
            <cahoots.result.ParseResult object>
        ],
        'types': [
            "URI"
        ]
    },
    'execution_seconds': 0.006306886672973633
}

Basic Server Usage

$ cahootserver --help

Cahoots Server Help:

    -h, --help
        Show this help

    -p [port], --port [port]
        Set the port the server should listen on

    -d, --debug
        Run the server in debug mode (errors displayed, debug output)

$ sudo cahootserver --port 80 --debug
 * 00:38:18 04/04/15 CDT * Bootstrapping AddressParser
 * 00:38:18 04/04/15 CDT * Bootstrapping CoordinateParser
 * 00:38:18 04/04/15 CDT * Bootstrapping DateParser
 * 00:38:18 04/04/15 CDT * Bootstrapping EmailParser
 * 00:38:18 04/04/15 CDT * Bootstrapping LandmarkParser
 * 00:38:18 04/04/15 CDT * Bootstrapping MeasurementParser
 * 00:53:19 04/05/15 CDT * Bootstrapping NameParser
 * 00:38:18 04/04/15 CDT * Bootstrapping PostalCodeParser
 * 00:38:18 04/04/15 CDT * Bootstrapping ProgrammingParser
 * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
 * Restarting with reloader
 * 00:38:18 04/04/15 CDT * Bootstrapping AddressParser
 * 00:38:18 04/04/15 CDT * Bootstrapping CoordinateParser
 * 00:38:18 04/04/15 CDT * Bootstrapping DateParser
 * 00:38:18 04/04/15 CDT * Bootstrapping EmailParser
 * 00:38:18 04/04/15 CDT * Bootstrapping LandmarkParser
 * 00:38:18 04/04/15 CDT * Bootstrapping MeasurementParser
 * 00:53:19 04/05/15 CDT * Bootstrapping NameParser
 * 00:38:18 04/04/15 CDT * Bootstrapping PostalCodeParser
 * 00:38:18 04/04/15 CDT * Bootstrapping ProgrammingParser
# CTRL+C pressed

$ sudo cahootserver --port 80
 * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)

License

The MIT License (MIT)

Copyright (c) 2012-2015 Serenity Software, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Cahoots integrates location data provided by GeoNames.

Cahoots uses many code samples for training a bayesian classifier. All code samples are from projects using either the BSD or MIT licenses. None of this code is executed at any time.

Release History

Release History

This version
History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.1

History Node

0.4.0

History Node

0.3.11

History Node

0.3.10

History Node

0.3.9

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3.0

History Node

0.2.2

History Node

0.2.1

History Node

0.2.0

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
Cahoots-0.5.2.zip (11.1 MB) Copy SHA256 Checksum SHA256 Source May 27, 2015

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