Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyclecycle/visualise-spacy-pattern
Visualise spacy dependency patterns
https://github.com/cyclecycle/visualise-spacy-pattern
Last synced: 21 days ago
JSON representation
Visualise spacy dependency patterns
- Host: GitHub
- URL: https://github.com/cyclecycle/visualise-spacy-pattern
- Owner: cyclecycle
- License: mit
- Created: 2019-06-16T13:53:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-20T18:12:39.000Z (over 3 years ago)
- Last Synced: 2024-12-05T14:16:20.461Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 96.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Visualise spacy pattern
## Installation
```bash
pip install visualise-spacy-pattern
```## Usage
```python
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)
```