Skip to main content

A fast implementation of RuSH (Rule-based sentence Segmenter using Hashing).

Project description

PyRuSH

PyRuSH is the python implementation of RuSH, which is orginally developed using Java. RuSH is an efficient, reliable, and easy adaptable rule-based sentence segmentation solution. It is specifically designed to handle the telegraphic written text in clinical note. It leverages a nested hash table to execute simultaneous rule processing, which reduces the impact of the rule-base growth on execution time and eliminates the effect of rule order on accuracy.

If you wish to cite RuSH in a publication, please use:

Jianlin Shi ; Danielle Mowery ; Kristina M. Doing-Harris ; John F. Hurdle.RuSH: a Rule-based Segmentation Tool Using Hashing for Extremely Accurate Sentence Segmentation of Clinical Text. AMIA Annu Symp Proc. 2016: 1587.

The full text can be found at https://knowledge.amia.org/amia-63300-1.3360278/t005-1.3362920/f005-1.3362921/2495498-1.3363244/2495498-1.3363247?timeStamp=1479743941616

Installation:

pip install PyRuSH

How to use:

A standalone RuSH class is available to be directly used in your code.

from PyRuSH.RuSH import RuSH
input_str = "The patient was admitted on 03/26/08\n and was started on IV antibiotics elevation" +\
", was also counseled to minimizing the cigarette smoking. The patient had edema\n\n" +\
"\n of his bilateral lower extremities. The hospital consult was also obtained to " +\
"address edema issue question was related to his liver hepatitis C. Hospital consult" +\
" was obtained. This included an ultrasound of his abdomen, which showed just mild " +\
"cirrhosis. "
rush = RuSH('../conf/rush_rules.tsv')
sentences=rush.segToSentenceSpans(input_str)
for sentence in sentences:
print('Sentence({0}-{1}):\t>{2}<'.format(sentence.begin, sentence.end, input_str[sentence.begin:sentence.end]))


Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

PyRuSH-1.0.2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file PyRuSH-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for PyRuSH-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3209843d39f00b45b34320953c3fe6e04a3dbe5d35d036e81a0432b63597a0a7
MD5 94f768fcc9a899f9a0eb739ff2f76a41
BLAKE2b-256 a7f47b43aaa0f88c7321a9688474ee4832796c632b22e5a3df4282a61589ce92

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page