Skip to main content

NIKL

Python PyPI
국립국어원(National Institute of Korean Language) 언어정보나눔터: 말뭉치 파일 전처리 코드

Installation

  • Pypi
    pip install nikl
    
  • Source Code
    git clone https://github.com/study-artificial-intelligence/nikl.git
    cd nikl
    python setup.py install
    

Requirements

  • beautifulsoup4     (pip install beautifulspul4로 설치)

Getting Started

  1. 변환을 원하는 국립국어원 언어정보나눔센터의 말뭉치 사전을 ./data폴더에 넣어주세요.
  2. 아래의 명령어에서 대괄호[, ]로 묶여있는 것들 중 선택해서 사용하세요.
    단, --filename에는 반드시 한 개 이상의 파일명이 들어가야 합니다.
  3. 코드가 정상적으로 작동 시, ./data/폴더에 파일이름_info.txt, 파일이름_content.txt가 생성됩니다.
python main.py --filename [파일명.txt] [--info] [--content] [--newline]

# ex1) python preprocess.py --filename test.txt --content --newline
#      test.txt에서 단락 내용만 개행문자를 포함해서 data/test_content.txt 파일 생성
# ex2) python preprocess.py --filename test2.txt test3.txt --info --content
#      text2.txt와 text3.txt에서 파일의 정보와 단락 내용을 각각 저장 후 data/test2_info.txt, test2_content.txt 
#                                                                    data/test3_info.txt, test3_content.txt 파일 생성
  • filename: 1개 이상의 파일명.txt 형식으로 입력해주세요. 국립국어원 말뭉치 파일 특성 상 txt 파일만 지원하고 있습니다.
  • info: 해당 파일의 전반적인 정보를 출력할지에 대한 여부를 나타냅니다. 기본값은 False 입니다.
  • content: 해당 파일의 내용를 출력할지에 대한 여부를 나타냅니다. 기본값은 False 입니다.
  • newline: 본문 내용을 전처리 할 때, 개행문자('\n') 삽입 여부를 나타냅니다. 삽입 시 문단 별로 결과물이 출력됩니다. 기본값은 False 입니다.

Release files for nikl 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nikl 1.1.0
File Size Uploaded
nikl-1.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nikl 1.1.0
File Interpreter ABI Platform
nikl-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / nikl-1.1.0.tar.gz

Download URL nikl-1.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e1fe104a51824aedd1d5ac3369ed95516196b129e42a6e3e6cc64365c686926a
BLAKE2b-256 checksum
How to use checksums
3609b83ce0281bf21a2caa0d0d5e523a7809639a1e3f76324452c04efc48a779
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Release files / nikl-1.1.0-py3-none-any.whl

Download URL nikl-1.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06b5b4b8671858156c66a7c9acf10eb1dc49be365c7ab1df63a3be92b64f2608
BLAKE2b-256 checksum
How to use checksums
9b7e9a6390764052644533308fb3f75099d51e49127fd0e3307d7f979a5392e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page