Comments (4)
@sbrugman : I beg your pardon but, can we use the commit you've made, to save predictions for both conll and Ontonotes sets, such that it takes in text and pumps out their labels?
Is PR (Inference and minor improvements #16) complete?
Goal:
Input: Germany lost a soccer game to Spain on Tuesday
Output: ['B-LOC', 'O', 'O', 'O', 'O', 'O', 'B-LOC', 'O', 'O']
Edit:
It would be of great help if someone can suggest the directory where the predictions are saved
Thanks
Regards
from dilated-cnn-ner.
Hi, I'm also looking for a way to validate the model in a more interactive manner by using real text data. @marc88, were you able to find a way to get the tags given a sentence?
from dilated-cnn-ner.
from dilated-cnn-ner.
I think I might have something that may work but I don't think I'm doing the preprocessing properly.
Essentially, I tokenized the sample sentence and then using code from the make_example
function in preprocess.py
, created the different feature vectors (tokens, shapes, chars, seq_len, and tok_len). Additionally, I passed in the vocabulary that the model was trained on, and if there were any tokens that were OOV, I just added them to the vocabulary.
However, I'm not sure this is either the right way to do or even a viable way to do it. From what I read in the code, the model uses a version of the embeddings scheme presented in the Lample paper so it takes into account word embeddings and character embeddings. So in the case of a OOV token, the embedding scheme should be able to create a robust embedding for it, right (provided I enabled character embeddings in the conf files)? If not, how should I deal with OOV tokens in the preprocessing stage?
I was printing out some sample feature vectors from the dev set and training set and comparing them to the ones that I generated dynamically and they look reasonably similar (in terms of padding and stuff) so I assumed I didn't mess up the preprocessing. I used code from the run_evaluation
method to do model inference. In the feed_dict, I just passed an array of zeroes for model.input_y
(is this okay or should I do anything different?) as the model should be predicting the labels. Right now, I'm looking at the predictions and trying to remap them back into the appropriate labels. My understanding is that there is padding at the beginning and end of the token feature vector. When I look at the predictions, the padding has a label for it that isn't O
. Should I just disregard that token?
Also, how does the preprocessing treat tokens with numbers? Does it change all the digits to 0? I was looking at the tokens.txt
file produced by the preprocessing and I was seeing conflicting behavior (i.e some tokens had their digits changed to all 0s and other tokens had their digits unchanged). For reference, I'm training this model for an NER task that involves detecting numerical data (i.e phone numbers).
from dilated-cnn-ner.
Related Issues (20)
- Inference HOT 5
- What is the use of projection layer HOT 1
- Questions regarding differences between the implementation and the experiment details in the research paper HOT 5
- Need some clarification on the settings HOT 2
- Training File HOT 1
- Training issue HOT 1
- Is the dilated cnn ner model stable? HOT 2
- Did you try your model on other seq labeling tasks like Chunking or POS? HOT 1
- Nan problem during training on ontonotes data set HOT 7
- Getting some issue with permission beyond my understanding HOT 3
- int() argument must be a string, a bytes-like object or a number, not 'map' HOT 2
- About the paper HOT 6
- details on the accuracy HOT 12
- preprocessing before triggering 'preprocess.sh' for ontonotes HOT 2
- InvalidArgumentError: indices[11,21] = 243838 is not in [0, 243245)
- Inconsistent results when predicting a single sentence versus predicting labels for dev set HOT 4
- Support for Tensorflow 1.13 HOT 4
- Any pytorch version of dilated-cnn-ner around ? HOT 3
- Question for the paper (only)
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 dilated-cnn-ner.