State-of-the-Art NER models - Keyphrases
Collection
1 item
•
Updated
•
1
This is a SpanMarker model trained on the Inspec dataset that can be used for Named Entity Recognition. This SpanMarker model uses bert-base-uncased as the underlying encoder. See train.py for the training script.
Label | Examples |
---|---|
KEY | "Content Atomism", "philosophy of mind", "IBS" |
Label | Precision | Recall | F1 |
---|---|---|---|
all | 0.5666 | 0.6230 | 0.5935 |
KEY | 0.5666 | 0.6230 | 0.5935 |
from span_marker import SpanMarkerModel
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-bert-base-uncased-keyphrase-inspec")
# Run inference
entities = model.predict("Adaptive filtering for noise reduction in hue saturation intensity color space Even though the hue saturation intensity -LRB- HSI -RRB- color model has been widely used in color image processing and analysis, the conversion formulas from the RGB color model to HSI are nonlinear and complicated in comparison with the conversion formulas of other color models. When an RGB image is degraded by random Gaussian noise, this nonlinearity leads to a nonuniform noise distribution in HSI, making accurate image analysis more difficult. We have analyzed the noise characteristics of the HSI color model and developed an adaptive spatial filtering method to reduce the magnitude of noise and the nonuniformity of noise variance in the HSI color space. With this adaptive filtering method, the filter kernel for each pixel is dynamically adjusted, depending on the values of intensity and saturation. In our experiments we have filtered the saturation and hue components and generated edge maps from color gradients. We have found that by using the adaptive filtering method, the minimum error rate in edge detection improves by approximately 15%")
You can finetune this model on your own dataset.
from span_marker import SpanMarkerModel, Trainer
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-bert-base-uncased-keyphrase-inspec")
# Specify a Dataset with "tokens" and "ner_tag" columns
dataset = load_dataset("conll2003") # For example CoNLL2003
# Initialize a Trainer using the pretrained model & dataset
trainer = Trainer(
model=model,
train_dataset=dataset["train"],
eval_dataset=dataset["validation"],
)
trainer.train()
trainer.save_model("tomaarsen/span-marker-bert-base-uncased-keyphrase-inspec-finetuned")
Training set | Min | Median | Max |
---|---|---|---|
Sentence length | 15 | 138.5327 | 557 |
Entities per sentence | 0 | 8.2507 | 41 |
Carbon emissions were measured using CodeCarbon.