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 (
Help us improve Python packaging - Donate today!

This is the text partitioner project for Python.

Project Description

## Synopsis

This is the Python partitioner project. The partitioner module performs advanced NLP tasks essentially equivalent to tokenization (e.g., splitting texts into words), with generalizations into multiword expressions (MWE) segmentation. A definition for those unfamiliar with MWEs:

“A group of tokens in a sentence that cohere more strongly than ordinary syntactic combinations.”

Thus, partitioner may be used to split texts “phrases” of one or more words.

## Code Example

Usage for the base setup is quite simple. The following will utilize all of the English data sets, requiring significant memory to load the training data:

>>> from import partitioner

>>> pa = partitioner()

>>> pa.partition(“How could something like this simply pop up out of the blue?”)

[‘How’, ‘ ‘, ‘could’, ‘ ‘, ‘something’, ‘ ‘, ‘like’, ‘ ‘, ‘this’, ‘ ‘, ‘simply’, ‘ ‘, ‘pop up’, ‘ ‘, ‘out of the blue’, ‘?’]

The large data set with the memory overhead comes from English Wikipedia. While bulky, this data set provides a huge number of named entities. To load from a specific source, use:

>>> pa = partitioner(language=”en”, source=”wiktionary”)

or one of the other data sets. To load all sets from a specific language (assuming data has been added beyond the starter data, which comes from Wikipedia), use:

>>> pa = partitioner(language=”es”, source=”“)

## Motivation

The original goal of the partitioner project was to create a fast, efficient, and general algorithm that segments texts into the smallest-possible meaningful units, which we refer to as phrases. This essentially coincides with the NLP task for comprehensive MWE segmentation segmentation. Reference for this modules function may be found in the following article:

## Installation

Using pip from the command line:

>>> pip install partitioner

Alternatively, if using git from a command line first clone the repository:

>>> git clone

then navigate the repository’s main directory and run:

>>> sudo python install

## Contributors

Jake Ryland Williams and Andy Reagan

## License


Release History

This version
History Node


History Node


History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(22.0 kB) Copy SHA256 Hash SHA256
Source Apr 20, 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