Skip to content

Commit

Permalink
Merge pull request #5 from kaniblu/install_fix
Browse files Browse the repository at this point in the history
Install fix
  • Loading branch information
kaniblu authored May 31, 2017
2 parents c028d75 + b50c049 commit 315d7e9
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.7"
- "3.6"
env:
- "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib"
install:
- sudo bash install_mecab_ko.sh
- bash install_twkorean.sh
- python setup.py install
script: py.test
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An integrated library for Korean language preprocessing.

<!--[![Build Status][1]][2]-->
[![Build Status][1]][2]

This simple library has following features.

Expand All @@ -14,21 +14,27 @@ This simple library has following features.
## Getting Started

For text normalization, [Open Korean Text](https://github.com/twitter/twitter-korean-text) is required. For tokenizations, [Mecab-ko](https://bitbucket.org/eunjeon/mecab-ko) is required.
First, run `install_mecab_ko.sh` with administrative privilege to install Mecab-ko system-wide.
First, run `install_mecab_ko.sh` with sudo to install Mecab-ko system-wide.

sudo bash install_mecab_ko.sh

**Note that `LD_LIBRARY_PATH` must be set to point to `/usr/local/lib:/usr/lib`***[]:

The script above will set that for you, but you must set it yourself after a restart.

Then run `setup.py install`.
Then install Open Korean Text Python Wrapper by running

bash install_twkorean.sh

Sudo is not required for this one.

Finally install `hangul-utils` package by cloning this repo and running

# install from source
python setup.py install

Optionally, you could install the package from pypi, but it is not recommended,
as some of the required packages must be installed from git repository.
as some of the required packages install properly only when installed from git repositories.

## Text Normalization

Expand Down
8 changes: 8 additions & 0 deletions install_twkorean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

REPO_DIR=/tmp/twkorean

rm -rf $REPO_DIR
git clone https://github.com/open-korean-text/open-korean-text-wrapper-python $REPO_DIR
cd $REPO_DIR
python setup.py install
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@
],
install_requires=[
"six",
"twkorean>=0.1.5",
"jpype1;python_version<='2.7'",
"jpype1-py3;python_version>='3.5'",
"mecab-python==0.996-ko-0.9.2"
],
dependency_links=[
"git+https://github.com/open-korean-text/"
"open-korean-text-wrapper-python#"
"egg=twkorean-0.1.5",
"git+https://bitbucket.org/eunjeon/"
"mecab-python-0.996#egg=mecab-python-0.996-ko-0.9.2"
]
Expand Down

0 comments on commit 315d7e9

Please sign in to comment.