--- tags: - flair - hunflair - token-classification - sequence-tagger-model language: en widget: - text: Isolate an enhancer element located between -89 and -50 bp in PAI-1 --- ## HunFlair2 model for ENHANCER [HunFlair](https://github.com/flairNLP/flair/blob/master/resources/docs/HUNFLAIR2.md) (biomedical flair) for enhancer entity: - pre-trained language model: michiyasunaga/BioLinkBERT-base - fine-tuned on RegEl corpus for `Enhancer` entity type Predicts 1 tag: | **tag** | **meaning** | | -------- | ------------------- | | Enhancer | DNA enhancer region | ______________________________________________________________________ ## Info ### Demo: How to use in Flair Requires: - **[Flair](https://github.com/flairNLP/flair/)>=0.14.0** (`pip install flair` or `pip install git+https://github.com/flairNLP/flair.git`) ```python from flair.data import Sentence from flair.nn import Classifier from flair.tokenization import SciSpacyTokenizer text = "An upstream activator of the mitogen-activated protein (MAP) kinase pathways was used to isolate an enhancer element located between -89 and -50 bp in PAI-1 promoter that was activated by MEKK-1." sentence = Sentence(text, use_tokenizer=SciSpacyTokenizer()) tagger = Classifier.load("regel-corpus/hunflair2-regel-enhancer") tagger.predict(sentence) print('The following NER tags are found:') # iterate over entities and print for entity in sentence.get_spans('ner'): print(entity) ```