模型:
GeoBERT是一个基于Geoscientific Corpus数据集对SciBERT进行微调的NER模型。该模型是在带标签的Geoscientific Corpus数据集(约100万个句子)上进行训练的。
该模型中的NER产品旨在识别与地球科学相关的四个主要语义类型或类别。
在训练过程中使用了以下超参数:
| entity | precision | recall | f1 |
|---|---|---|---|
| GeoLoc | 0.9727 | 0.9591 | 0.9658 |
| GeoMeth | 0.9433 | 0.9447 | 0.9445 |
| GeoPetro | 0.9767 | 0.9745 | 0.9756 |
| GeoTime | 0.9695 | 0.9666 | 0.9680 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("botryan96/GeoBERT")
model = AutoModelForTokenClassification.from_pretrained("botryan96/GeoBERT")
#Define the pipeline
from transformers import pipeline
ner_machine = pipeline('ner',model = models,tokenizer=tokenizer, aggregation_strategy="simple")
#Define the sentence
sentence = 'In North America, the water storage in the seepage face model is higher than the base case because positive pore pressure is requisite for drainage through a seepage face boundary condition. The result from the resistivity data supports the notion, especially in the northern part of the Sandstone Sediment formation. The active formation of America has a big potential for Oil and Gas based on the seismic section, has been activated since the Paleozoic'
#Deploy the NER Machine
ner_machine(sentence)