Foreword
Recently, I wanted to learn about nlp-related technologies, so I found ltp to get started.
ltp homepage: http://ltp.readthedocs.io/zh_CN/latest/index.html
ltp is a Chinese natural language processing suite developed by Harbin Institute of Technology. Now it also provides cloud services to the outside world, but there are certain restrictions on the frequency and number of interface calls:http://www.ltp-cloud.com/
The ltp server allows users to start an nlp service locally, the model used by the service can be dynamically upgraded, and the service is exposed to the http protocol. Relatively speaking, the usage is more friendly and allows multilingual calls.
Build steps
Download the installation file from the official website, take the version I use as an example: ltp-3.4.0.zip, unzip the file, and generate a folder ltp-3.4.0.
Enter the decompressed folder and enter the following command:
./configure
make
It's like this when compiling
Wait patiently for the end of the make command, and then start preparing the model file.
The so-called model file is used when ltp is running, and can also be downloaded from the official website. The version I use is ltp_data_v3.4.0.zip.
Unzip the model file to the newly compiled folder ltp-3.4.0, unzip and rename the resulting folder to ltp_data (you can also not rename it, but you need to manually specify the path when starting the server).
Finally, start the server. Note that some parameter settings are required during startup. My own startup command is:
./bin/ltp_server --port 8020 --threads 4 --log-level 2 &
The specific meaning of the parameters can be read by yourself.
curl test output
curl -d "s=I love Beijing" "http://127.0.0.1:8020/ltp"
carry out
supplement:
The ltp server crashes when running locally. In fact, the author has built a simple health check script for us. Please see src/server/run.pl. A little modification will ensure that the service is always online.
K8S Series: DNS Service Construction Guide First, SkyDNS configuration file description Second, modify the Kubelet startup parameters on each Node Third, create SkyDNS RC and Service Fourth, find serv...
CENTOS7 Environment FTP service construction Environment: CentOS7.X system IP:192.168.1.8 First of all 1. Install the FTP server 2. Start and check whether it is successful ① Start and set the boot se...
As the basic function of the service discovery mechanism, you need to access the service through the service name. This is to need a DNS service within a cluster range to complete the analysis of from...
Table of contents First, use the tools of new scaffolding on the official website to create projects. 1.1. Enter the interface of the creation project. 2. Configure according to the official we...
Build from the zero learning website Learn to build a website~ I haven’t touched anything on the web. Starting from scratch, I set up a blog to record the bits and pieces of the learning process...
Finally, I borrowed the server, and it’s okay to bring my own computer with the complete set, mainly because I want to participate in a competition... I can’t do internship anymore. It may...
Mind map link:http://v3.processon.com/view/link/5f7ec46b762131119546c87d Taken from "Guide to High-Performance Website Construction" and "Advanced Guide to High-performance Website Cons...
High-performance website construction guide (notes) Preface A Performance golden rule Rule 4-Compress components How does compression work What to compress save Configuration Proxy cache Function shor...
Applicable situation (1) windows platform (2)nexus version 3.3.2 (3)jdk1.7 (4)maven2 Situation description: Due to firewall reasons, a special machine inside the company can connect to the maven centr...
final effect Prepare 1. The host name of the mail server is mail.jzhu.cn Configuration steps vi /etc/postfix/main.cf 1. Modify myhostname 2. Modify mydomain 3. Modify myorigin 4. Modify inet_interface...