Skip to content

shovalsa/SPMRL-to-UD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPMRL-to-UD

converts YAP's output from the SPMRL scheme to UD v2.

Useful links

  1. UD general guidelines
  2. Hebrew treebank
  3. Hebrew specific guidelines

How to Use

First, install dependencies with pip install -r requirements.txt. Run a YAP server locally. If it runs remotely, modify the url in converter.py or demo.py.

To run the demo, simply run:

$ streamlit run demo.py

Otherwise, embed this in your python code:

from src.utils import call_api, parse_yap_output
from src.converter import run

text = 'אכלת פלפל? שתה מיץ.' # or any text you wish
url = ... # your YAP/NEMO server address (without port)
method = <"yap/heb/joint" / "multi_align_hybrid" / "morph_hybrid">
for sentence, content, ents in call_api(text, url, use_nemo=<False/True>, method=method):
    spmrl = parse_yap_output(content, ents)
    ud = convert(spmrl)

About

converts YAP's output from the SPMRL scheme to UD v2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages