This model is a product of the use case "Increasing FAIRness of FAIRagro data through AI supported metadata enrichment" which is part of the
FAIRagro consortium. The model is fine-tuned based on the
annotated dataset
where it is trained to extract entities related to crops, soil, locations, and time statements from agriculture research datasets. It is used in the use case to
extract this information from the legacy research data and publications. Its application is to enrich current metadata by extracting agricultural metadata from current
unstructured parts of metadata (titles and abstracts).
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
This model is intended to be used as an NER model for agriculture research. The entities it can extract are:
1[
2 "soilReferenceGroup",
3 "soilOrganicCarbon",
4 "soilTexture",
5 "startTime",
6 "endTime",
7 "city",
8 "duration",
9 "cropSpecies",
10 "soilAvailableNitrogen",
11 "soilDepth",
12 "region",
13 "country",
14 "longitude",
15 "latitude",
16 "cropVariety",
17 "soilPH",
18 "soilBulkDensity"
19]
This model is not intended to be used in other domains outside of agriculture research or the English or German languages.
This model is limited by its training dataset of entity-annotated agriculture titles and abstracts from a specific span of time. This may not generalize well for all use cases in different domains. Furthermore, the model occassionally tags subword tokens as entities where there are special signs (e.g., "-,/") and post-processing of results may be necessary to handle those cases.
Users (both direct and downstream) should be made aware of the risks, biases, and limitations of the model.
It is recommended to post-process the raw outputs of the model.
Use the code below to get started with the model.
1from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
2
3roberta_fairagro = AutoModelForTokenClassification.from_pretrained("IT-ZBMED/Agriculture_NER_Model_for_FAIR_Metadata_Enrichment")
4tokenizer = AutoTokenizer.from_pretrained("IT-ZBMED/Agriculture_NER_Model_for_FAIR_Metadata_Enrichment")
5
6nlp = pipeline("ner", model=roberta_fairagro, tokenizer=tokenizer, aggregation_strategy="simple")
7
8example = (
9 "In early spring 2025, maize and soybean seedlings established quickly in the loamy sand soil as warmer temperatures "
10 "accelerated germination, while by late autumn, the clay loam field supported a robust barley crop that matured well despite the soil’s slower drainage."
11)
12
13ner_results = nlp(example)
14print(ner_results)
1[{'entity_group': 'startTime', 'score': 0.9885543, 'word': 'spring 2025', 'start': 9, 'end': 20},
2 {'entity_group': 'cropSpecies', 'score': 0.9997772, 'word': 'maize', 'start': 22, 'end': 27},
3 {'entity_group': 'cropSpecies', 'score': 0.98714954, 'word': 'soybean', 'start': 32, 'end': 39},
4 {'entity_group': 'soilTexture', 'score': 0.99048805, 'word': 'loamy sand', 'start': 77, 'end': 87},
5 {'entity_group': 'soilTexture', 'score': 0.97245836, 'word': 'clay loam', 'start': 167, 'end': 176},
6 {'entity_group': 'cropSpecies', 'score': 0.9997045, 'word': 'barley', 'start': 202, 'end': 208}]
The model was fine-tuned on the whole training dataset of the sentence-split.
The evaluation was done by the seqeval library based on precision, recall and f1 scores.
Carbon emissions can be estimated using the
Machine Learning Impact calculator presented in
Lacoste et al. (2019).