This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

The purpose of the module Match is to get the offsets (as well as the string between those offsets, for debugging) of a cleaned-up, tokenized string from its original, untokenized source. “Big deal,” you might say, but this is actually a pretty difficult task if the original text is sufficiently messy, not to mention rife with Unicode characters.

Consider some text, stored in a variable original_text, like:

I am writing a letter ! Sometimes,I forget to put spaces (and do weird stuff with punctuation) ? J’aurai une pomme, s’il vous plâit !

This will/should/might be properly tokenized as:

[[u’I’, u’am’, u’writing’, u’a’, u’letter’, u’!’],
[u’Sometimes’, u’,’, u’I’, u’forget’, u’to’, u’put’, u’spaces’, u’-LRB-‘, u’and’, u’do’, u’weird’, u’stuff’, u’with’, u’punctuation’, u’-RRB-‘, u’?’], [u”J’aurai”, u’une’, u’pomme’, u’,’, u”s’il”, u’vous’, u’plxe2it’, u’!’]]

Now:

In [22]: Match.match(original_text, [u’-LRB-‘, u’and’, u’do’, u’weird’, u’stuff’, u’with’, u’punctuation’, u’-RRB-‘]) Out[22]: [(60, 97, u’(and do weird stuff with punctuation)’)]

In [23]: Match.match(original_text, [u’I’, u’am’, u’writing’, u’a’, u’letter’, u’!’]) Out[23]: [(0, 25, u’I am writing a letter !’)]

In [24]: Match.match(original_text, [u”s’il”, u’vous’, u’plxe2it’, u’!’]) Out[24]: [(121, 138, u”s’il vous plxe2it !”)]

Release History

Release History

0.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
match-0.2.2.tar.gz (5.9 kB) Copy SHA256 Checksum SHA256 Source Oct 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development 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