Skip to main content

Sherlok is a flexible and powerful open source, distributed, real-time text-mining engine.

pip install --upgrade sherlok

from sherlok import Sherlok

s = Sherlok('neuroner')

# returns a list of tuples (begin, end, text, annotation_type, attributes{})
print s.annotate('layer 4 neuron')

[(0, 14, 'layer 4 neuron', u'Neuron', {}),
 (8, 14, 'neuron',  u'Neuron', {}),
 (8, 14, 'neuron',  u'NeuronTrigger', {}),
 (0, 7,  'layer 4', u'Layer', {u'ontologyId': u'HBP_LAYER:0000004'})]


# filtering and finding the text back
txt = 'parvalbumin-positive fast-spiking basket cells, somatostatin-positive regular-spiking bipolar and multipolar cells, and cholecystokinin-positive irregular-spiking bipolar and multipolar cells'
morphology = s.annotate(txt, u'Morphology')
for (start, end, text, _type, properties) in morphology:
    print text, properties[u'ontologyId']

basket HBP_MORPHOLOGY:0000019
bipolar HBP_MORPHOLOGY:0000006
multipolar HBP_MORPHOLOGY:0000035
bipolar HBP_MORPHOLOGY:0000006
multipolar HBP_MORPHOLOGY:0000035

Release files for sherlok 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sherlok 0.1.6
File Size Uploaded
sherlok-0.1.6.tar.gz 2.8 kB Details

Release files / sherlok-0.1.6.tar.gz

Download URL sherlok-0.1.6.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f11805d5b9cac9c6cee06661859908f187964f30c216ac3928eef4dc56b07dc
BLAKE2b-256 checksum
How to use checksums
37b336b0d32264d54edb67c0a1c34068671e963a7671ece558941f774e7c4912
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page