Turning web data into official statistics: Classifying Portuguese retail products with NLP models

Read full text
Authors: Juliana de Freitas Ulisses Machado, Bruno Veloso
Cited by: 0
References: 7

Abstract

The growing availability of online data creates new opportunities to improve the timeliness and detail of official statistics, particularly in domains such as price monitoring and inflation measurement. However, leveraging web-scraped data for official use requires alignment with standardized classification frameworks such as the European Classification of Individual Consumption According to Purpose (ECOICOP). We train two natural-language models, a lightweight convolutional neural network (CNN) and a fine-tuned BERTimbau transformer, to classify Portuguese food and beverage items into ECOICOP categories. Using 100,000 product titles scraped from six national supermarket sites and labeled via a human-in-the-loop workflow, the CNN reaches a macro-F1 of 92.19 % with minimal computing cost, while the transformer attains 94.00 %, the first such result for Portuguese. Both models are published on Hugging Face, enabling reproducible inference at scale while the source data remain confidential. The study delivers the first open-source Portuguese ECOICOP classifiers for food and beverage products, a replicable low-resource labeling workflow, and a benchmark of accuracy-speed trade-offs to guide researchers in similar tasks.

Fields of Study & Subjects

Topic Modeling Text and Document Classification Technologies Computational and Text Analysis Methods

Publication details

Journal / source
Statistical Journal of the IAOS
Volume
42
Issue
1
Pages
122–136
Publication date
3 February 2026
Language
EN