Comments (7)
Yes, we agree :) We are currently implementing this and will push soon into release-0.3 branch for testing, and then (hopefully soon) we will release the next version that will contain this feature!
from flair.
I'd be interested in confidences for the assigned labels in the sequence labeling tasks (and may implement it, if you are not already working on this).
In case of a linear output layer one can apply an additional softmax to obtain a confidence value. In case of a CRF output layer, it seems as if a forward-backward algorithm is required (which is perhaps a bit too costy).
from flair.
Added to release-03 branch - will be part of next release!
from flair.
In the case of two label classification, can we somehow get the probability of given text document for both classes?
For example, For a given text document D1, I need output like this:
Class 1: probability 0.7
Class 2: probability 0.3
(both probabilities should be summing to 1)
If yes, how to achieve that? It would be really helpful for me.
Thanks in advance,
Rajat
from flair.
There is a PR pending right now that will allow you to do this, see #693. Once its merged you will have this functionality in the master branch and eventually in the next release of Flair.
from flair.
Hi guys, in which versions and how can I use this feature?
Thanks :)
from flair.
Hi @haozturk you already can with the current version:
from flair.data import Sentence
from flair.models import SequenceTagger
tagger = SequenceTagger.load('ner')
sentence = Sentence('I live in Berlin')
tagger.predict(sentence)
for entity in sentence.get_spans('ner'):
print(entity)
print(entity.tag)
print(entity.score)
from flair.
Related Issues (20)
- [Question]: HOT 2
- Release Flair 0.13
- [Question]: How to train an end-to-end Entity Linking model? HOT 3
- [Question]: Subtoken Labeling? HOT 3
- [Question]: Is there a default mapping between label values and ids? HOT 3
- [Question]: FLAIR NER English works in Airgaped environment, However NER English Large doesn't HOT 4
- [Question]: HOT 1
- [Bug]: UnboundLocalError: local variable 'has_unknown_label' referenced before assignment HOT 1
- [Bug]: Reduce transformer vocab of XLM-RoBERTa HOT 4
- [Feature]: use iteration count instead of total_train_samples when logging metrics
- Issue with special unicode characters during inference of finetuned models flair HOT 1
- [Question]: Difference Between `train` and `fine_tune` Methods in `ModelTrainer` HOT 2
- [Bug]: Memory leak in flair models HOT 9
- [Bug]: Inconsistent document count when loading custom dataset with ColumnCorpus HOT 2
- [Bug]: Model double sizes after training. Ho to make FP16 for prediction? HOT 7
- [Bug]: Cannot use NER models offline HOT 1
- [Question]: "Redewiedergabe" taggers for flair versions > 0.10 HOT 1
- [Bug]: Receiving Named Entity from Token with `get_label()` does not work as expected HOT 2
- [Question]: Why not include cell type detection in Hunflair? HOT 3
- [Question]: Regarding the issue of reading label spans during corpus construction.
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 flair.