Metadata Extraction Code Samples

The metadata extraction models is a fine-tuned model that lives in the static categorization endpoint. This model allows you to extract product attributes from a product title and description and formats them into the Shopify Metadata Format.

These are code examples we've used to interact with the Pumice.ai metadata extraction endpoint and the correlated data.

Output Nested List to Dict

// output nested list
output = [[' Dimensions', '14" x 19"'], [' Material', 'Woven textile'], [' Care Instructions', 'To clean, simply wipe with soap, water, and a soft sponge/cloth. Standard antibacterial cleanser can also be used. Air dry. Chilewich placemats should be stored flat. Do not fold placemats or allow them to crease.'], [' Product Description', 'Make your tabletop more vibrant with the Chilewich Color Tempo Placemat! Made from woven textiles, this Chilewich placemat features beautiful, multi-tonal stripes which transition from light to dark, and makes a dramatic statement on any table. Suitable for both indoor and outdoor use, the Color Tempo Placemat is as durable as it is beautiful and best of all, is easy to clean!']]
// formats as a dict
o = {k[0]: k[1:][0] for k in output}
print(type(o))