Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hướng dẫn đầy đủ cài đặt C++ Tokenizer & ES 7.12.1 Analysis Vietnam plugin #23

Open
thusinh1969 opened this issue Sep 27, 2021 · 6 comments

Comments

@thusinh1969
Copy link

*** Môi trường Ubuntu 18.04 (or whatever), phải install Java JDK chứ không phải JRE vì cần javac cho cái C++ Tokenizer. Các file .yml tự làm cho chuẩn theo hường dẫn của các gits. Docker hay VM cũng vậy, đơn giản thế này.

sudo su
apt-get update -y
apt-get upgrade -y
apt-get install build-essential cmake unzip pkg-config gcc-7 g++-7 -y
apt-get install wget curl nano git default-jdk maven -y

cd /

*** Tải ElasticSearch 7.12.1
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.12.1-linux-x86_64.tar.gz
tar -xzf elasticsearch-7.12.1-linux-x86_64.tar.gz
mv elasticsearch-7.12.1-linux-x86_64 /es

** Tải ES Analysis Vietnam
git clone https://github.com/duydo/elasticsearch-analysis-vietnamese.git
cd elasticsearch-analysis-vietnamese
mvn package

** Tải C++ Tokenizer
git clone https://github.com/coccoc/coccoc-tokenizer.git
cd coccoc-tokenizer
mkdir build
cd build
cmake -DBUILD_JAVA=1 ..
make install

** Cài plugin:
cd /es
echo "Y" | ./bin/elasticsearch-plugin install file:///elasticsearch-analysis-vietnamese/target/releases/elasticsearch-analysis-vietnamese-7.12.1.zip

*** Chuẩn bị
groupadd -g 999 nqrt && useradd -r -u 999 -g nqrt nqrt
usermod -aG sudo nqrt
chown nqrt:nqrt /es -R
sysctl -w vm.max_map_count=262144

su nqrt

** Run
export ES_JAVA_OPTS="-Xms2048m -Xmx2048m -Djava.library.path=/usr/local/lib"
cd /es
./bin/elasticsearch

@bachan
Copy link
Member

bachan commented Sep 29, 2021

Cảm ơn bạn :)

@cpfriend1721994
Copy link

cpfriend1721994 commented Nov 17, 2021

Mình có viết Dockerfile/Docker-Compose Elasticsearch 7.12.1 với coccoc-tokenizer và elasticsearch-analysis-vietnamese cho ae nào cần https://github.com/cpfriend1721994/docker-es-cococ-tokenizer

@lengockyquang
Copy link

Cho mình hỏi coccoc-tokenizer có thể support thêm cho windows được không ạ ? Mình trong build_java.sh thì chỉ thấy build ra file so

@Mr-Jack-Tung
Copy link

xin chào, bạn cho mình hỏi chút, mình đang dùng máy macbook M1 (macOS Ventura), vậy làm thế nào để cài đặt được coccoc-tokenizer cho Python trên Jupiter Notebook nhỉ ? cảm ơn bạn nhé!

@duytrandev
Copy link

@Mr-Jack-Tung bạn đã cài được chưa, nếu được cho mình xin hướng dẫn với

@hiendinhngoc
Copy link

Khi cài xong tokenizer, mình có check lại bằng cách gõ tokenizer thì thấy báo lỗi:
Error openning file, alphabetic
Có ai gặp trường hợp này giống mình không nhỉ? Mình đang dùng ubuntu 20.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants