Comments (4)
Now we add from_config to data and models. (but without examples for now). What do you mean then u say "more generalized model".
What about vocab - :( we release saving labels vocabs in next month. Text vocab is the BERT vocab_file.
from ner-bert.
You know, in some situation, maybe a word predict as location, which actually is person name, or vice versa. So maybe I can keep a vocabulary to save location or person name or organization name.
Also I can use other feature, ex: pos tagging, or other manual defined feature.
After I do that, in the test process, perhaps there are low chances to predict wrong.
from ner-bert.
I have another question, In predict, I need create data, model, learner, then load pre-trained model.
But, after I have trained the model, I don't need to create data, model etc. I only want to loads model, process data, then predict the sequence label.
from ner-bert.
U are right. Before now we use this code only for experiments. We will add this functions in next month. That about meta (additional) information of words or sentences. U can add your own vector with such info:
data = NerData.create(train_path, valid_path, vocab_file, is_cls=False, is_meta=True)
model = BertBiLSTMAttnCRF.create(len(data.label2idx), bert_config_file, init_checkpoint_pt, meta_dim=30)
meta_dim - is the dimension of your additional information. U can encode POS tags with OneHot (but we know that this is bad). We will add embedder for meta soon.
We do release in next month with new features (meta info, different schemas (BIO, IOX - as in BERT)), easy predict and so on.
from ner-bert.
Related Issues (20)
- Key Error creating NerData HOT 1
- more details for the models ? HOT 1
- the pytorch version? HOT 2
- prev_label = "" Error HOT 1
- The length of token sequence is different from tag sequence HOT 2
- UnicodeDecodeError on the vocab file HOT 1
- Do you plan to train bert on Russian and use it as pretrained? HOT 1
- UnboundLocalError: local variable 'prev_label' referenced before assignment HOT 1
- FP16 and NVIDIA Apex support HOT 2
- a small bug in `get_mean_max_metric` function HOT 1
- BIO vs IO HOT 6
- Question about this release HOT 1
- loss explosion HOT 1
- Hello, is there a LICENSE for this project? Thanks HOT 1
- should we calculate F1-score with micro-average or macro-average?
- what is HOT 2
- Mistake in main_metrics HOT 1
- RuntimeError: Expected tensor [2, 512, 1], src [2, 371, 6] and index [2, 512, 1] to have the same size apart from dimension 2
- question about model
- Predict a sentence using BERTBiLSTMAttnNCRF without passing a dataloader HOT 1
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 ner-bert.