license: cc0-1.0
task_categories:
- token-classification
language:
- en
tags:
- named-entity-recognition
- ner
- scientific
- unit-conversion
- units
- measurement
- natural-language-understanding
- automatic-annotations
Natural Unit Conversion Dataset
Dataset Overview
This dataset contains unit conversion requests, where each example includes a sentence with associated entities (in spaCy-supported format) for Named-Entity Recognition (NER) modeling. The entities represent the values and units being converted. The goal is to aid in developing systems capable of extracting unit conversion data from natural language for natural language understanding.
The data is structured with the following fields:
text
: The sentence containing the unit conversion request natural text.entities
: A list of entity annotations. Each entity includes:- The start and end (exclusive) positions of the entity in the text.
- The entity type (e.g.,
UNIT_VALUE
,FROM_UNIT
,TO_UNIT
,FEET_VALUE
,INCH_VALUE
).
Examples
[
{
"text": "I'd like to know 8284 atm converted to pascals",
"entities": [
[39, 46, "TO_UNIT"],
[17, 21, "UNIT_VALUE"],
[22, 25, "FROM_UNIT"]
]
},
{
"text": "Convert 3'6\" to fts",
"entities": [
[8, 9, "FEET_VALUE"],
[10, 11, "INCH_VALUE"],
[16, 19, "TO_UNIT"]
]
},
{
"text": "Convert this: 4487 n-m to poundal meters",
"entities": [
[26, 40, "TO_UNIT"],
[14, 18, "UNIT_VALUE"],
[19, 22, "FROM_UNIT"]
]
},
]
Loading Dataset
You can load the dataset maliknaik/natural_unit_conversion
using the following code:
from datasets import load_dataset
dataset_name = "maliknaik/natural_unit_conversion"
dataset = load_dataset(dataset_name)
Entity Types
- UNIT_VALUE: Represents the value to be converted.
- FROM_UNIT: The unit from which the conversion is being made.
- TO_UNIT: The unit to which the conversion is being made.
- FEET_VALUE: The value representing feet in a length conversion.
- INCH_VALUE: The value representing inches in a length conversion.
Dataset Split and Sampling
The dataset is split using Stratified Sampling to ensure that the distribution of entities is consistent across training, validation, and test splits. This method helps to ensure that each split contains representative examples of all entity types.
- Training Set: 583,863 samples
- Validation Set: 100,091 samples
- Test Set: 150,137 samples
Supported Units
The dataset supports a variety of units for conversion, including but not limited to:
Length: inches, feet, yards, meters, centimeters, millimeters, micrometers, kilometers, miles, mils
Area: square meters, square inches, square feet, square yard, square centimeters, square miles, square kilometers, square feet us, square millimeters, hectares, acres, are
Mass: ounces, kilograms, pounds, tons, grams, ettograms, centigrams, milligrams, carats, quintals, pennyweights, troy ounces, uma, stones,, micrograms
Volume: cubic meters, liters, us gallons, imperial gallons, us pints, imperial pints, us quarts, deciliters, centiliters, milliliters, microliters, tablespoons us, australian tablespoons, cups, cubic millimeters, cubic centimeters, cubic inches, cubic feet, us fluid ounces, imperial fluid ounces, us gill, imperial gill
Temperature: celsius, fahrenheit, kelvin, reamur, romer, delisle, rankine
Time: seconds, minutes, hours, days, weeks, lustrum, decades, centuries, millennium, deciseconds, centiseconds, milliseconds, microseconds, nanoseconds
Speed: kilometers per hour, miles per hour, meters per second, feets per second, knots, minutes per kilometer
Pressure: atmosphere, bar, millibar, psi, pascal, kilo pascal, torr, inch of mercury, hecto pascal
Force: newton, kilogram force, pound force, dyne, poundal
Energy: kilowatt hours, kilocalories, calories, joules, kilojoules, electronvolts, energy foot pound
Power: kilowatt, european horse power, imperial horse power, watt, megawatt, gigawatt, milliwatt
Torque: newton meter, kilogram force meter, dyne meter, pound force feet, poundal meter
Angle: degree, radians
Digital: byte, bit, nibble, kilobyte, gigabyte, terabyte, petabyte, exabyte, tebibit, exbibit, etc
Fuel_efficiency: kilometers per liter, liters per100km, miles per us gallon, miles per imperial gallon
Shoe_size: eu china, usa canada child, usa canada man, usa canada woman, uk india child, uk india man, uk india woman, japan
Usage
This dataset can be used for training named entity recognition (NER) models, especially for tasks related to unit conversion and natural language understanding.
License
This dataset is available under the CC0-1.0 license. It is free to use for any purpose without any restrictions.
Citation
If you use this dataset in your work, please cite it as follows:
@misc{unit-conversion-dataset,
author = {Malik N. Mohammed},
title = {Natural Language Unit Conversion Dataset for Named-Entity Recognition},
year = {2025},
publisher = {HuggingFace},
journal = {HuggingFace repository}
howpublished = {\url{https://huggingface.co/datasets/maliknaik/natural_unit_conversion}}
}