10000 GitHub - aslemen/pyksnk: Python toolkit for CHILDES MOR dictionaries and annotations
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

aslemen/pyksnk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kusunoki Dictioanry Management Tools

Using Python 3

Dependencies

Required

  • Python >= 3.5
  • Python Packages
    • ruamel.yaml
    • click
    • pandas
    • lark-parser
    • attrs
    • typing

Installation

If you want to use it as a python package (and via the commandline)

pip install (--user) git+https://github.com/aslemen/pyksnk

If you want to use it via Docker

docker run -it aslemen/pyksnk

Uninstallation

pip remove pyksnk

Usage

Using Interactive Interpreters

Example:

# load the modules
import sys
import pandas as pd
import pyksnk.mordict as md

# load the dictionary file
dic: md.Dictionary
with open("path/to/some_dict.cut") as f:
    dic = md.parse(f.name, f.read())

# convert the dictionary to a Pandas DataForm
dic_pd: pd.DataFrame = dic.to_dataframe()

# You can play around with `dic_pd`
#   before pushing it back to the original dictionary object `dic`
dic.update_with_dataframe(dic_pd)

# write the modified `dic` out to the STDOUT
dic.dump_mordict(sys.stdout)

Via Commandline

pyksnk [command] [subcommand]

Please see the helps.

About

Python toolkit for CHILDES MOR dictionaries and annotations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0