Comments (5)
要使用自己微調的 model,請使用 model_name 而非 model。
ws_driver = CkipNerChunker(model_name="tmp/tf_model.h5")
from ckip-transformers.
您好
首先非常感謝您的回覆,我後面注意到了
且我一開始是使用tensorflow微調的model
後面查看了一下先前的issue,發現好像只能使用Pytorch的run_ner.py來去微調
不過這部分我已經成功了
但目前在使用上仍有個問題是,我微調完的model,在使用
ws_driver = CkipWordSegmenter(model_name="pytorch_ner_model") pos_driver = CkipPosTagger(model_name="pytorch_ner_model")
接沒有問題都能正確斷詞與跑出結果(pytorch_ner_model是我自己的model path)
但再ner的任務中,我按照範例嘗試使用了
ner_driver = CkipNerChunker(model_name="pytorch_ner_model") ner = ner_driver(example, use_delim=True)
回傳的結果ner裡面卻是空的
有沒有什麼可能發生這樣的情況可供參考呢
from ckip-transformers.
這邊有可能的錯誤是你的模型的 label 與 CkipNerChunker 預期的格式不符合
CkipNerChunker 使用的是 BIOES https://en.wikipedia.org/wiki/Inside–outside–beginning_(tagging) 標記
from ckip-transformers.
好的,我了解了
那在請問一下,斷詞的方式會有差嗎
我目前dataset的label方式是將每個中文字一個一個拆開
並去給予BIO標記
from ckip-transformers.
斷詞的部分僅使用 B 、 I 兩種標記
from ckip-transformers.
Related Issues (20)
- Pinning memory issue HOT 1
- When I use model inference, why do the embedding generated by the same sentence are different every time HOT 7
- 简体中文 HOT 1
- NER 怎么使用输出ner对应标签 HOT 1
- max_length in README is not correct? HOT 1
- how to compare ckiplab/bert-base-chinese with bert-base-chinese? HOT 1
- Output的embedding獲取 HOT 1
- 如何引用? HOT 1
- 有没有简体中文bert-tiny的预训练模型? HOT 1
- Set device = -1 but still using GPU HOT 3
- 啥时候能出一个支持gpt2 和 bloom的ner模型呀
- 请问POS任务中识别出的标签=Neu是什么意思呢 HOT 2
- fineTune Model HOT 3
- 請問finetune模型前,有辦法更改模型原有label的個數嗎 HOT 1
- 請教BERT-base-chinese預訓練方式 HOT 2
- Is it possible to provide a demo code for bert-base-chinese-qa?
- Chinese text classification model usage example HOT 2
- function pack_ws_pos_sentece() was not defined
- CKIP embedding model for Traditional Chinese ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ckip-transformers.