% Author: Simon-Pierre Boucher — contact@spboucher.ai % %====================================================================== \section{Methodology} \label{sec:methodology} %====================================================================== \subsection{Methodological Overview} Our framework transforms unstructured listing text into a set of interpretable features through a four-stage pipeline, illustrated in Figure~\ref{fig:methodology}: (1)~extraction and preprocessing of listing descriptions; (2)~encoding into dense vector representations using a pre-trained sentence transformer; (3)~computation of cosine similarities against a set of researcher-designed reference descriptions; and (4)~integration of the resulting similarity features into a hedonic pricing model. \begin{figure}[!htbp] \centering \includegraphics[width=\textwidth]{fig7_methodology.pdf} \caption{Methodological framework: from listing text to hedonic price estimates.} \label{fig:methodology} \begin{minipage}{0.9\textwidth} \footnotesize Notes: This figure illustrates the four-stage pipeline: (1) text extraction, (2) sentence embedding, (3) cosine similarity computation against 20 reference descriptions, and (4) integration into a hedonic pricing model. \end{minipage} \end{figure} \subsection{Text Extraction and Preprocessing} Each property listing in our database includes a \textit{PublicRemarks} field containing the agent-written description. We extract this field and apply minimal preprocessing: listings with descriptions shorter than 20 characters are excluded as uninformative, and listings with missing or non-positive prices are removed. We deliberately avoid aggressive text preprocessing (stemming, lemmatization, stop-word removal) because the sentence transformer model is designed to process natural-language text and internally handles tokenization. In addition to the embedding-based features, we compute a simple text length measure (character count of the description) as a control variable. Description length may proxy for listing effort, property complexity, or market conditions, and including it ensures that our semantic features capture content rather than verbosity. \subsection{Sentence Embedding} Each listing's description $d_i$ is encoded into a 384-dimensional unit vector using the all-MiniLM-L6-v2 sentence transformer: \begin{equation} \bfe_i = f_{\bftheta}(d_i) \in \R^{384}, \quad ||\bfe_i|| = 1 \end{equation} The model processes text through 6 transformer layers with 384 hidden dimensions, applying mean pooling over token embeddings and $L_2$ normalization to produce the final sentence embedding. The model handles both English and French text, which is important for our Quebec-based corpus where listings are predominantly in French with occasional English phrases. Embeddings are computed in batches of 256 for computational efficiency. The entire corpus of 17,087 descriptions is encoded in approximately 14 seconds on consumer hardware (Apple M-series CPU), making the approach practical for large-scale applications. \subsection{Reference Description Design} \subsubsection{Rationale} The key methodological innovation is the construction of reference descriptions that serve as semantic anchors. Rather than applying unsupervised dimensionality reduction (PCA, autoencoders) to the 384-dimensional embedding space---which would yield features without natural economic interpretation---we project each listing's embedding onto a set of researcher-defined semantic axes. Each axis is defined by a reference description that embodies a specific qualitative housing dimension. This approach is analogous to the construction of factor-mimicking portfolios in asset pricing \citep{fama1993common}: just as Fama-French factors are portfolios designed to load on specific risk dimensions, our reference descriptions are synthetic texts designed to load on specific quality dimensions. Within the text-as-data toolkit, the design is a semantic generalization of the dictionary method \citep{loughran2011liability, gentzkow2019text}: each reference plays the role of a curated word list, but the matching operates in embedding space, so paraphrases and synonyms contribute to the intended dimension without being enumerated. It is likewise related to anchor-based zero-shot classification, in which label descriptions serve as fixed textual anchors \citep{yin2019benchmarking}, except that we retain the continuous similarity scores as regression covariates instead of discretizing them into class labels. \subsubsection{Reference Categories} We define 20 reference descriptions spanning six broad domains of housing quality, listed in Table~\ref{tab:references}. Each reference is a synthetic paragraph of 150--260 characters, written in French to match the listing corpus, containing the vocabulary, phrasing, and semantic content characteristic of its dimension. \input{tables/tab_references} \subsubsection{Design Principles} The reference descriptions were designed following three principles. First, \textit{semantic saturation}: each reference includes multiple synonyms, related phrases, and characteristic vocabulary to ensure broad coverage of its target dimension. Second, \textit{dimensional specificity}: each reference targets a single qualitative dimension to minimize cross-loading. Third, \textit{linguistic consistency}: all references are written in French using vocabulary typical of Quebec real estate listings, ensuring alignment with the embedding space of the listing corpus. \subsection{Cosine Similarity Computation} For each property $i$ and reference $j$, we compute the cosine similarity: \begin{equation} s_{ij} = \text{sim}(\bfe_i, \mathbf{r}_j) = \bfe_i \cdot \mathbf{r}_j \label{eq:sim} \end{equation} where $\mathbf{r}_j$ is the $L_2$-normalized embedding of the $j$-th reference. The result is a similarity matrix $\mathbf{S} \in \R^{n \times 20}$. Each $s_{ij} \in [-1, 1]$ measures the degree to which property $i$'s description semantically resembles reference $j$. A higher score indicates that the listing text uses language closer in meaning to the reference description, capturing not just keyword overlap but deeper semantic alignment. The full similarity matrix is computed as a single matrix multiplication $\mathbf{S} = \mathbf{E} \cdot \mathbf{R}'$, where $\mathbf{E} \in \R^{n \times 384}$ is the matrix of listing embeddings and $\mathbf{R} \in \R^{20 \times 384}$ is the matrix of reference embeddings. This operation is computationally trivial. \subsection{Hedonic Model Specification} We estimate a series of nested OLS models with White-Huber heteroskedasticity-robust standard errors (HC3 variant): \begin{align} \text{Model A:} \quad \ln(P_i) &= \alpha + \bfbeta' \bfX_i + \eps_i \label{eq:modelA} \\ \text{Model B:} \quad \ln(P_i) &= \alpha + \bfbeta' \bfX_i + \delta \cdot \ell_i + \eps_i \label{eq:modelB} \\ \text{Model C:} \quad \ln(P_i) &= \alpha + \bfbeta' \bfX_i + \bfgamma' \bfs_i + \eps_i \label{eq:modelC} \\ \text{Model D:} \quad \ln(P_i) &= \alpha + \bfbeta' \bfX_i + \delta \cdot \ell_i + \bfgamma' \bfs_i + \eps_i \label{eq:modelD} \\ \text{Model E:} \quad \ln(P_i) &= \alpha + \bfbeta' \bfX_i + \delta \cdot \ell_i + \bfgamma_{\text{sig}}' \bfs_i^{\text{sig}} + \eps_i \label{eq:modelE} \end{align} \noindent where $\bfX_i$ includes six structural variables (bedrooms, bathrooms, half-bathrooms, parking spaces, stories, and lot size), $\ell_i$ is the description length (character count), $\bfs_i$ is the full vector of 20 cosine similarities, and $\bfs_i^{\text{sig}}$ retains only the similarities that are individually significant at the 5\% level in Model~D. All independent variables are standardized (zero mean, unit variance) prior to estimation, so coefficients represent the effect of a one-standard-deviation change. The choice of HC3 standard errors, recommended by \citet{mackinnon1985some} for samples of moderate size, provides consistent inference under heteroskedasticity without requiring specification of the error variance structure. The incremental contribution of semantic features is tested using an \fstat: \begin{equation} F = \frac{(\text{SSR}_A - \text{SSR}_D) / q}{\text{SSR}_D / (n - k - 1)} \label{eq:ftest} \end{equation} where $q$ is the number of additional semantic variables and $k$ is the total number of regressors in Model~D. \subsection{Identification and Interpretation} \label{sec:identification} The coefficients on the semantic similarity variables should be interpreted as \textit{conditional associations}---implicit semantic price gradients---rather than causal effects. This stance follows the modern reading of cross-sectional hedonic coefficients as equilibrium price gradients rather than structural willingness-to-pay parameters \citep{ekeland2004identification, kuminoff2013new}. Three distinct channels could generate the observed correlations between listing language and prices, and the cross-sectional design cannot distinguish among them. \textbf{Information channel.} Agents accurately describe observable property attributes that affect prices but are not captured by the structural variables in our model. Under this interpretation, the semantic coefficients recover the implicit prices of genuine quality dimensions: luxury finishes, renovation status, natural amenities, and so forth. The listing text serves as a proxy for unobserved quality, and the coefficients have a straightforward hedonic interpretation. \textbf{Persuasion channel.} Listing language influences buyer perceptions and willingness to pay, independent of underlying property quality. Skillfully written descriptions could inflate perceived value, creating a price premium attributable to marketing rather than to the property itself. Under this interpretation, the semantic coefficients capture the return to agent effort and linguistic skill rather than housing quality. \textbf{Omitted-location channel.} Listing language proxies for locational characteristics that are correlated with both the property's description and its price. For example, the negative coefficient on Family-Friendly language likely reflects the systematic association between family-oriented marketing and lower-priced suburban markets, rather than a negative valuation of schools and parks. Similarly, New Construction language may capture peripheral location rather than an intrinsic quality discount. In practice, the observed coefficients likely reflect a mixture of all three channels. The information channel is most plausible for dimensions with clear quality content (Luxury, Needs Renovation, Waterfront), while the omitted-location channel is most relevant for dimensions with geographic content (Family-Friendly, New Construction, Quiet \& Peaceful). The absence of explicit spatial controls in our baseline specification (see Section~\ref{sec:discussion}) means that some semantic coefficients absorb locational price variation. \noindent\textit{Scope of inference.} We interpret our estimates as measuring whether and how much semantic content in listing text is associated with price variation, conditional on observed structural characteristics. This is informative for automated valuation, market segmentation, and understanding the informational content of agent narratives, even without causal identification. We avoid language implying that semantic similarity ``causes'' or ``determines'' prices throughout the paper.