Each detected monetary amount is represented as a candidate:
where:
-
$p_i$ is the positive numeric amount; -
$q_i$ is the detected or expected currency; -
$s_i$ is the extraction source; -
$t_i$ is the visible text associated with the amount; -
$d_i$ is the local page context surrounding the candidate.
The parser supports common decimal conventions. When both . and , are present, the rightmost separator is interpreted as the decimal separator. Repeated groups of three digits are interpreted as thousands separators.
The local model maps each candidate and requested item to an eleven-dimensional feature vector:
The features include:
- extraction-source indicators;
- currency agreement;
- positive and negative price attributes;
- query-token overlap;
- sale-price and list-price terms;
-
$\log(1+p_i)$ ; - normalized text length.
The query-overlap ratio is defined as:
where
When no trained model is available, the system computes a linear score followed by a logistic transformation:
The weights reward structured product data, matching currencies, price-labelled elements, and query overlap. They penalize list-price, MSRP, and other negative contexts.
This score is a transparent ranking heuristic. It must not be interpreted as a calibrated probability that the extracted amount is the true market price.
A labelled candidate dataset can be used to train
The implementation uses class balancing, bounded tree depth, a minimum leaf size, and a fixed random seed. These choices reduce variance and make training reproducible.
Users must create labels from their own legally collected and appropriately licensed pages.
For multiple prices associated with the same item and currency, define the median price as:
The median absolute deviation is:
The modified z-score of candidate
A candidate is marked as an outlier when:
This rule is applied only when at least three observations are available and
The selected row is the highest-confidence non-outlier. It is not necessarily the lowest observed price.
Let:
-
$N$ be the number of enabled items; -
$U$ be the maximum number of URLs processed per item; -
$\tau$ be the average request time; -
$W$ be the number of workers.
An idealized lower bound for the total runtime is:
Actual runtime is generally higher because:
- requests are rate-limited per domain;
- browser fallbacks are more expensive than direct HTTP requests;
- proxy and cloud providers add latency;
- retries, timeouts, and anti-bot protections increase execution time.
Increasing
- A confidence score measures consistency with the selected features and training labels, not objective truth.
- Displayed prices may exclude taxes, shipping, minimum-order quantities, contract conditions, or regional restrictions.
- Currency matching is not currency conversion.
- A product-page price may be stale, personalized, dynamically generated, or dependent on authentication.
- Statistical outlier rejection may remove legitimate offers in small or multimodal markets.
- A trained model can reproduce biases or annotation errors present in its training dataset.