Annotating the Tweebank Corpus on Named Entity Recognition and Building NLP Models for Social Media Analysis
Paper โข 2201.07281 โข Published
Run TweebankNLP/bertweet-tb2-ner on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/TweebankNLP/bertweet-tb2-ner. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/TweebankNLP/bertweet-tb2-ner on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use TweebankNLP/bertweet-tb2-ner with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="TweebankNLP/bertweet-tb2-ner") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("TweebankNLP/bertweet-tb2-ner")
model = AutoModelForTokenClassification.from_pretrained("TweebankNLP/bertweet-tb2-ner", device_map="auto")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("TweebankNLP/bertweet-tb2-ner")
model = AutoModelForTokenClassification.from_pretrained("TweebankNLP/bertweet-tb2-ner", device_map="auto")Tweebank-NER), trained on the Tweebank-NER training data. TweebankNLP project, please refer to this our paper and github page. HuggingFace-BERTweet (TB2) in the NER table.from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("TweebankNLP/bertweet-tb2-ner")
model = AutoModelForTokenClassification.from_pretrained("TweebankNLP/bertweet-tb2-ner")
If you use this repository in your research, please kindly cite our paper:
@article{jiang2022tweetnlp,
title={Annotating the Tweebank Corpus on Named Entity Recognition and Building NLP Models for Social Media Analysis},
author={Jiang, Hang and Hua, Yining and Beeferman, Doug and Roy, Deb},
journal={In Proceedings of the 13th Language Resources and Evaluation Conference (LREC)},
year={2022}
}
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="TweebankNLP/bertweet-tb2-ner")