-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: How to programmatically get the NER of a word? #3261
Comments
This is a
but it doesn't actually have anything on it This is also a Label:
I think the NER documentation would benefit from an example of how to access it programmatically, and if there's an easier way, it would be good to hear about it. Thanks! |
Hi @AngledLuffa , |
Thanks! That is definitely helpful. Might also be worthwhile to mention
how to get the start and end indices of the words which were labeled.
…On Fri, Jun 9, 2023, 3:34 PM Benedikt Fuchs ***@***.***> wrote:
Hi @AngledLuffa <https://github.com/AngledLuffa> ,
we are currently restructuring our docs and try to set them up in a more
complete way soon.
However in the specific case, you have the answer to your question
documented here
<https://flairnlp.github.io/docs/tutorial-basics/how-predictions-work#getting-the-predictions>
—
Reply to this email directly, view it on GitHub
<#3261 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2AYWNC4AZT2OMUF67UGZDXKOQF7ANCNFSM6AAAAAAZABWZMU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, Can you pls provide a solution how to get actual start and end indices such that using this indices I can extract detected entity like spacy ner model provides ? |
Question
In the sample NER, you suggest doing the following:
Is there a good way to get the NER of a specific word, such as the first word,
George
? The closest I can figure out is to look at the spans and theirtokens
, which have anidx
field. Still, it would be much easier to look at the members sentence, saysentence[0]
, and somehow get the NER off it...sentence[0].ner
does not exist, thoughThanks!
The text was updated successfully, but these errors were encountered: