Skip to main content

jp2en web services api collection

Project description

==========
jp-net-kit
==========

Collection of utilities, dedictated for consuming following services:

* MeCab;
* JDic;
* Kradfile
* Weblio;
* Jisho;
* Wordnet.


Example usage:

#!/usr/bin/env python
# encoding: utf-8

from jpnetkit.kradfile import Kradfile
from jpnetkit.jisho import Jisho
from jpnetkit.weblio import Weblio
from jpnetkit.mecab import MeCab

# our kanji
amusing_kanji = u'称'

# get radical decomposition
radicals = Kradfile().get_radikals_for(amusing_kanji)

# compile examples list with readings and translation
# for each of the word, that contains our kanji
examples = {}
weblio = Weblio()
mecab = MeCab()
jisho = Jisho()

for word in jisho.complete(amusing_kanji):
for sentence, translation in weblio.examples(word).iteritems():
examples[word] = {
'example': sentence,
'translation': translation,
'reading': mecab.get_reading(sentence),
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jpNetKit-0.1dev.tar.gz (9.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page