A a development platform for high-level NLP applications in Japanese
Project description
pyknp-eventgraph
EventGraph is a development platform for high-level NLP applications in Japanese. The core concept of EventGraph is event, a language information unit that is closely related to predicate-argument structure but more application-oriented. Events are linked to each other based on their syntactic and semantic relations.
Requirements
- Python 3.6
- pyknp: 0.4.1
- graphviz: 0.10.1
Installation
$ pip install pyknp-eventgraph
or
$ python setup.py install
Use EventGraph as a CLI application
Constructing EventGraph
$ echo '彼女は海外勤務が長いので、英語がうまいに違いない。' | jumanpp | knp -tab | evg -o example-eventgraph.json
Visualizing EventGraph
$ evgviz example-eventgraph.json example-eventgraph.svg
Use EventGraph as a Python library
Constructing EventGraph
from pyknp_eventgraph import EventGraph
from pyknp_eventgraph.utils import read_knp_result_file
# construct EventGraph from a KNP result file
evg = EventGraph.build(read_knp_result_file('example.knp'))
# output EventGraph as a JSON file
evg.save('example-eventgraph.json')
Loading EventGraph
from pyknp_eventgraph import EventGraph
# load EventGraph from a JSON file
with open('example-eventgraph.json', encoding='utf-8', errors='ignore') as f:
evg = EventGraph.load(f)
Visualizing EventGraph
from pyknp_eventgraph import EventGraph
from pyknp_eventgraph import make_image
# load EventGraph from a JSON file
with open('example-eventgraph.json', 'r', encoding='utf-8', errors='ignore') as f:
evg = EventGraph.load(f)
# convert EventGraph to its visualization
make_image(evg, 'example-eventgraph.svg')
Authors
- Kurohashi-Kawahara Lab, Kyoto University.
- contact@nlp.ist.i.kyoto-u.ac.jp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyknp-eventgraph-5.0.3.tar.gz
(20.8 kB
view details)
Built Distributions
pyknp_eventgraph-5.0.3-py3.7.egg
(68.2 kB
view details)
File details
Details for the file pyknp-eventgraph-5.0.3.tar.gz
.
File metadata
- Download URL: pyknp-eventgraph-5.0.3.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39c4707e24904aca30eef466fddb5d997655061069901fdab133b247435c0f3 |
|
MD5 | 94bebcdac9d4dee04b4c6ebf5d782635 |
|
BLAKE2b-256 | 8a86c988a88e904ef723704c8204ee2b0d69139d26bead3ecd86b866d9443083 |
File details
Details for the file pyknp_eventgraph-5.0.3-py3.7.egg
.
File metadata
- Download URL: pyknp_eventgraph-5.0.3-py3.7.egg
- Upload date:
- Size: 68.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2903338add2ea58330619c276c7b9c3593e253975ba4e17858c06f076954630 |
|
MD5 | 09bd6b03fc5e5d4816464d534f571634 |
|
BLAKE2b-256 | f6d4589268a83cf756275d142e73e04cef6560f68ce6028387ab979a0997894f |
File details
Details for the file pyknp_eventgraph-5.0.3-py3-none-any.whl
.
File metadata
- Download URL: pyknp_eventgraph-5.0.3-py3-none-any.whl
- Upload date:
- Size: 28.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ea39725a681d57b2a3b3ef10232344e118b79f08d97675817e20c125134a38d |
|
MD5 | ddedfd9d40eebb154c00f45dd1eb3063 |
|
BLAKE2b-256 | 5e6ac51d10fac9f31902da0300b59cbc2b10745a345b17c528fd7fc9159b8e42 |