Skip to main content

KOrean Rpc-based Application for Handy Application for Language-processing

Project description

Korhal

GitHub tag (latest SemVer) PyPI Travis (.com) branch Codacy branch grade

Korhal(KOrean Rpc-based Handy Application for Language-processing) is a python wrapper for several korean Part-Of-Speech taggers.

How to install

pip install korhal

Available taggers

  • KOMORAN with korhal.komoran
  • Hannanum with korhal.hannanum
  • Open-source Korean Text Processor with korhal.openkoreantext

How to use

from korhal.komoran import tokenize

result = tokenize("집에 가서 잠을 자고 싶다")
# result => Token(text=집,pos=NNG), Token(text=에,pos=JKB), Token(text=가,pos=VV), Token(text=아서,pos=EC), Token(text=잠,pos=NNG), Token(text=을,pos=JKO), Token(text=자,pos=VV), Token(text=고,pos=EC), Token(text=싶,pos=VX), Token(text=다,pos=EC)]
print(result.text) # => 집
print(result.pos) # => NNG

nouns = [token.text for token in result if token.pos.startswith('N')]

Asynchronous methods

With korhal.aio, you can use asynchronous methods. The performance of multi-core systems can be slightly improved when performing extensive processing.

from korhal.aio.opentextkorean import tokenize
 
texts = ['달디단 맛있는 케이크가 있었다', '솜사탕 같이 귀여운 구름']
futures = [tokenize(text) for text in texts]
results = [f.result() for f in futures]

Thanks to

Project details


Download files

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

Source Distribution

korhal-0.1.2.tar.gz (8.8 kB view details)

Uploaded Source

File details

Details for the file korhal-0.1.2.tar.gz.

File metadata

  • Download URL: korhal-0.1.2.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for korhal-0.1.2.tar.gz
Algorithm Hash digest
SHA256 141c3d0d2cd720778b1468841ce64280d9be5b398ec1115293afe86321de12b4
MD5 d32a44dbeedd8b4c856380368d8e5784
BLAKE2b-256 6e7107e35f443c62799e6323ff58befc26d11b0b271047858855c56ccd2bf5eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page