Implement Korean text tokenizer

## What changes were proposed in this pull request?

Implement Korean text tokenizer

## What type of PR is it?

Feature

## What is the Jira issue?

https://issues.apache.org/jira/browse/HIVEMALL-307

## How was this patch tested?

unit tests and manual tests on EMR

## How to use this feature?

```sql
-- show version of lucene-analyzers-nori
select tokenize_ko();
> 8.8.2

select tokenize_ko("소설 무궁화꽃이 피었습니다.");
> ["소설","무궁","화","꽃","피"]

select tokenize_ko("소설 무궁화꽃이 피었습니다.", null, "mixed");
> ["소설","무궁화","무궁","화","꽃","피"]

select tokenize_ko("소설 무궁화꽃이 피었습니다.", null, "discard", array("E", "VV"));
> ["소설","무궁","화","꽃","이"]

select tokenize_ko("Hello, world.", null, "none", array(), true);
> ["h","e","l","l","o","w","o","r","l","d"]

select tokenize_ko("Hello, world.", null, "none", array(), false);
> ["hello","world"]

select tokenize_ko("나는 C++ 언어를 프로그래밍 언어로 사랑한다.", null, "discard", array());
> ["나","는","c","언어","를","프로그래밍","언어","로","사랑","하","ᆫ다"]

select tokenize_ko("나는 C++ 언어를 프로그래밍 언어로 사랑한다.", array("C++"), "discard", array());
> ["나","는","c++","언어","를","프로그래밍","언어","로","사랑","하","ᆫ다"]
```

## Checklist

- [x] Did you apply source code formatter, i.e., `./bin/format_code.sh`, for your commit?
- [x] Did you run system tests on Hive (or Spark)?

Author: Makoto Yui <myui@apache.org>

Closes #237 from myui/korean_tokenizer.
15 files changed
tree: 14bbf04ea15fb7f465fa381923e0db2e4c5be683
  1. .github/
  2. bin/
  3. conf/
  4. core/
  5. dist/
  6. docs/
  7. mixserv/
  8. nlp/
  9. resources/
  10. src/
  11. tools/
  12. xgboost/
  13. .dockerignore
  14. .gitignore
  15. .rat-excludes
  16. .travis.yml
  17. ChangeLog.md
  18. DISCLAIMER
  19. KEYS
  20. LICENSE
  21. NOTICE
  22. pom.xml
  23. README.md
  24. VERSION
README.md

Apache Hivemall: Hive scalable machine learning library

Build Status Documentation Status License Coverage Status Twitter Follow

Apache Hivemall is a scalable machine learning library that runs on Apache Hive, Apache Spark, and Apache Pig. Hivemall is designed to be scalable to the number of training instances as well as the number of training features.

Usage

Hivemall

Find more examples on our user guide and find a brief introduction to Hivemall in this slide.

Support

Support is through user@hivemall.incubator.apache.org, not by a direct e-mail.

Contributing

If you are planning to contribute to this repository, we first request you to create an issue at our JIRA page even if the topic is not related to source code itself (e.g., documentation, new idea and proposal).

All Hivemall functions are defined under resources/ddl. In order to update the definition files, the following script helps inserting function name and class path of your new UDF:

$ ./bin/update_ddls.sh

Moreover, don't forget to update function list in the document as well:

$ ./bin/update_func_md.sh

Note that, before creating a pull request including Java code, please make sure your code follows our coding conventions by applying formatter:

$ ./bin/format_code.sh