Skip to main content

Visualise spacy dependency patterns

Project description

Visualise spacy pattern

Installation

pip install visualise-spacy-pattern

Usage

import visualise_spacy_pattern

# Load the example dependency pattern
pattern_file = 'examples/pattern_1.json'
with open(pattern_file) as f:
    pattern = json.load(f)

graph = visualise_spacy_pattern.to_pydot(pattern)
png = graph.create_png()
graph_file = 'examples/graph_1.png'.format()
with open(graph_file, 'wb') as f:
    f.write(png)

Project details


Download files

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

Source Distribution

visualise-spacy-pattern-0.0.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

visualise_spacy_pattern-0.0.3-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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