hankcs / hankcs/HanLP

关于 java 版本中使用静态变量存储字典路径的问题

Open
#1,781 2 comments 0 reactions 1 assignee Claimed by @hankcs View on GitHub
feature request
Dominant language
Python
Stars
36.5k
Forks
10.9k
PR merge metrics
No merged PRs in 30d

Description

**Describe the feature and the current behavior/state.**
当前 java 版本使用静态变量储存字典路径, 其有个弊端是无法在一个 classloader 下同时开启多个使用不同路径的 hanlp 的 instance.
比如说我想开启两个实例, 一个用它来处理繁体, 一个用其处理简体. 这个在当前实现下很难实现, 因为两者的词典路径会冲突.

**Will this change the current api? How?**
不会更改api,属于内部实现更改

**Who will benefit with this feature?**
所有的 Java 版本用户

**Are you willing to contribute it (Yes/No):**
Yes

**System information**
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): 与 OS 无关
- Python version: xxx
- HanLP version: 1.8.3-portable

**Any other info**
No

* [x] I've carefully completed this form.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.