Coder Social home page Coder Social logo

Comments (7)

alanakbik avatar alanakbik commented on May 13, 2024 1

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.

kilian-gebhardt avatar kilian-gebhardt commented on May 13, 2024

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.

alanakbik avatar alanakbik commented on May 13, 2024

Added to release-03 branch - will be part of next release!

from flair.

Rajat-Mehta avatar Rajat-Mehta commented on May 13, 2024

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.

alanakbik avatar alanakbik commented on May 13, 2024

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.

haozturk avatar haozturk commented on May 13, 2024

Hi guys, in which versions and how can I use this feature?

Thanks :)

from flair.

alanakbik avatar alanakbik commented on May 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.