Introduction

Author

Requirements

Installation

pip install ehownet -U

Usage

E-HowNet Parser

See http://ehownet.readthedocs.io/src/grammar.html for E-HowNet grammar.

CLI

# Usage
ehn-parser <text> [<text> ...]

# Example
ehn-parser \
   "{MusicTool|樂器_x:predication={own|有:possession={按鈕|PushingButton:whole={x}}}}" \
   "{InstitutePlace|場所:telic={or({experiment|實驗:location={~}},{research|研究:location={~}})}}" \
   "TimePoint={},manner={urgent|急}"

Output:

Python API

from ehn.parse import EhnParser

text = '{MusicTool|樂器_x:predication={own|有:possession={按鈕|PushingButton:whole={x}}}}'

parser = EhnParser()
ress = parser(text, debug=False)
for res in ress:
   print(res)

Output:

License

CC BY-NC-SA 4.0

Copyright (c) 2019 Mu Yang under the CC-BY-NC-SA 4.0 License. All rights reserved.