deezer/weslang — dự án mã nguồn mở — đang có 54 sao GitHub. A language detection Web Service
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Weslang: is a standalone WEb Service to detect the LANGuage of a given piece
of text.
It works by executing both CLD2 and
Language-Detection.
The exposed API is very simple:
host:8080/detect?q=<TEXT>
The endpoint also supports POST requests in case longer payloads are required.
The response will be a JSON document like the following:
{
"language": "en",
"confidence": 0.99
}
Where language is the ISO_639-1 code of the language (except for Chinese in
which the locale is also returned, that is the result would be either zh-cn or
zh-tw).
Additional endpoints for checking the health of the webservice will be exposed
at localhost:9001.
Among the endopoints one can find
http://localhost:9001/health
http://localhost:9001/metrics
http://localhost:9001/env
http://localhost:9001/info
http://localhost:9001/mappings
http://localhost:9001/trace
This is done automatically by the Spring-Boot framework, via the
Actuator plugin.
Components
This project includes two components that could easily be a project on their
own.
Java Bindings for CLD2
Using JNA a Java interface is exposed for
getting the language via the CLD2 library.
The code lives in //java/com/deezer/research/cld2
Fork of Language-Detection
In //third-party/java/language-detection-v2 we have a fork of
language-detection.
The main changes we did, was to remove the randomization and some performance
improvements. See the file THIRD_PARTY.yaml in that folder for a comprehensive
list of changes.
Building and Testing
To build and test this project BUCK is
required and also Java 7. That means that it cannot be built under Windows.
$ buck test --all
$ buck build //java/com/deezer/research/language:detection_app
Running
The build command generated a file called
buck-out/gen/java/com/deezer/research/language/detection_app.jar, which is a
self contained binary.
To run it just execute:
$ java -jar detection_app.jar
If for some reason you don't want or can't execute both detectors, you could
run:
Currently the Cld2 bindings are only generated for linux-x86-64, so if your
machine is different it probably won't work. In such a case, just execute it
with the java_only profile.
Launch service using docker
The service can be also launched using docker. It requires the installation of docker and docker-compose. See docker home page for installation references.
Once docker is installed execute
$ docker-compose up -d
this will build the image of the service and launch it. To see on which port the service is exposed,
execute docker-compose ps. This will display a table similar to the example below:
$ docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------------
weslang_api_1 java -jar buck-out/gen/jav ... Up 0.0.0.0:32774->8080/tcp
in above example, the service on port 8080 is exposed on port 32774.
On Mac OsX, docker runs on a VM. To know the actual ip, it can be executed the following command:
$ boot2docker ip
192.168.59.103
in above example, the service can be queried by executing:
deezer/weslang có 54 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/deezer/weslang. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
deezer/weslang có phải mã nguồn mở không?
Có — deezer/weslang phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/deezer/weslang.
deezer/weslang còn đang phát triển không?
Commit gần nhất trên deezer/weslang là 9.3 năm trước (theo timestamp GitHub). Repo có 10 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
deezer/weslang dùng license gì?
deezer/weslang phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
deezer/weslang là gì?
deezer/weslang (deezer/weslang) là dự án Java trên GitHub. Theo mô tả gốc: A language detection Web Service
deezer/weslang viết bằng ngôn ngữ gì?
deezer/weslang chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về deezer/weslang ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/deezer/weslang là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
weslang có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về weslang.