Views
No views yet
| 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 |
1from transformers import AutoTokenizer, AutoModelForTokenClassification
2
3tokenizer = AutoTokenizer.from_pretrained("botryan96/GeoBERT")
4model = AutoModelForTokenClassification.from_pretrained("botryan96/GeoBERT")
5
6#Define the pipeline
7from transformers import pipeline
8ner_machine = pipeline('ner',model = models,tokenizer=tokenizer, aggregation_strategy="simple")
9
10#Define the sentence
11sentence = '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'
12
13#Deploy the NER Machine
14ner_machine(sentence)