flair
flair copied to clipboard
biaffine_model
Using the biaffine model as decoder to solve the NER problem. The code based on the SequenceTagger model. But the accuracy and precision of the model is very bad, the cause of the problem has not been found yet.
The code about biaffine model is referenced :https://github.com/juntaoy/biaffine-ner
Hi @87302380 ,
thanks for adding this! I can have a look at it :)
One question: have you already implemented the context functionality? For a given t
the context for generating the embedding for t
will be calculated from the x
left (and right?) tokens, and x
== 64 tokens? But I have to look at the paper again.
Hi @87302380 ,
thanks for adding this! I can have a look at it :)
One question: have you already implemented the context functionality? For a given
t
the context for generating the embedding fort
will be calculated from thex
left (and right?) tokens, andx
== 64 tokens? But I have to look at the paper again.
I didn't implement that function. Because I thought that was already integrated in flair's embedding layer. (I refer to the training in the FLERT paper)
embeddings = TransformerWordEmbeddings(
model='xlm-roberta-large',
layers="-1",
subtoken_pooling="first",
fine_tune=True,
use_context=True,
)
I always thought that just setting use_context to True would do the trick:cold_sweat:. I will start working on code related to embedding.
Yes, setting use_context
to True should do it!
@87302380 , any chance of this merging with flair? I got great results with Biaffine for NER and would be a great addition to Flair 😄
Thank you for your attention!I am working towards this, but it will take some time. :wink:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.