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

彌補srl的資訊漏失 #699

Open
kanasimi opened this issue Jun 1, 2024 · 8 comments
Open

彌補srl的資訊漏失 #699

kanasimi opened this issue Jun 1, 2024 · 8 comments

Comments

@kanasimi
Copy link

kanasimi commented Jun 1, 2024

小弟最近在撰寫不知為何消失的ltp-server
發現從LTP 4.1.5.post2到現在版本的產出,有些資訊被漏掉了。


請將
https://github.com/HIT-SCIR/ltp/blob/17f689c4f0b23dfb04d76c1e16c6c2e8adacfcfd/python/interface/ltp/nerual.py#L212C32-L212C71

(tag, "".join(words[start : end + 1]))

改成

(tag, "".join(words[start : end + 1]), start, end)

以及

{"predicate": predicate, "arguments": arguments}

改成

{"index": item, "predicate": predicate, "arguments": arguments}

例如當我們解析
這種方法很好用,那種方法很好用,哪種方法最好用?
這段話,會發現 srl中的 “好用” “很” 不曉得該用哪個。
加上index之後可方便確認到底是哪個 “好用” “很”。

@AlongWY
Copy link
Contributor

AlongWY commented Jun 4, 2024

非常感谢

@kanasimi
Copy link
Author

kanasimi commented Jun 8, 2024

我們能否新增一個命令列參數,允許人們設定想要使用的模型?

@AlongWY
Copy link
Contributor

AlongWY commented Jul 25, 2024

这样server需要换入换出吧,可以考虑再加一层?

@kanasimi
Copy link
Author

抱歉我不太理解您的意思。我現在只能採用重寫 server.py 的方式來達成此目的,因為現有 server.py 已經寫死模型了。

@AlongWY
Copy link
Contributor

AlongWY commented Jul 26, 2024

更新后的server是可以自定义模型的?

@kanasimi
Copy link
Author

kanasimi commented Jul 27, 2024

我們可不可能採用argparse?
https://docs.python.org/3/library/argparse.html

@AlongWY
Copy link
Contributor

AlongWY commented Jul 29, 2024

当然可以

@kanasimi
Copy link
Author

那我們就新增一個命令列參數,允許人們設定想要使用的模型了。

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

Successfully merging a pull request may close this issue.

2 participants