SlowGuess/NAACL_2021_OCR huggingface dataset:
Aina Garí Soler
CNRS, LIsN
91400, Orsay, France
aina.gari@limsi.fr
Department of Digital Humanities
marianna.apidianaki@helsinki.fi
The intensity relationship that holds between scalar adjectives (e.g., nice  $<$  great  $<$  wonderful) is highly relevant for natural language inference and common-sense reasoning. Previous research on scalar adjective ranking has focused on English, mainly due to the availability of datasets for evaluation. We introduce a new multilingual dataset in order to promote research on scalar adjectives in new languages. We perform a series of experiments and set performance baselines on this dataset, using monolingual and multilingual contextual language models. Additionally, we introduce a new binary classification task for English scalar adjective identification which examines the models' ability to distinguish scalar from relational adjectives. We probe contextualised representations and report baseline results for future comparison on this task.
Scalar adjectives relate the entities they modify to specific positions on the evoked scale (e.g., GOODNESS, TEMPERATURE, SIZE): A wonderful view is nicer than a good view, and one would probably prefer a delicious to a tasty meal. But not all adjectives express intensity or degree. Relational adjectives are derived from nouns (e.g., wood → wooden, chemistry → chemical), have no antonyms and serve to classify nouns (e.g., a wooden table, a chemical substance) (McNally and Boleda, 2004). The distinction between scalar and relational adjectives is an important one. Identifying adjectives that express intensity can serve to assess the emotional tone of a given text, as opposed to words that mostly contribute to its descriptive content. Additionally, estimating the intensity of a scalar adjective is useful for textual entailment (wonderful |= good but good ≠ wonderful), product review analysis and recommendation systems, emotional chatbots and question answering (de Marneffte et al., 2010).
DEMELO
EN	dim < gloomy < dark < black
FR	terne <ASFIRE < foncé < noir
ES	sombrífo < tenebroso < oscuro < negro
EL	αμνδρός || αχνός < μούντός < σχοτεινός < μαύρος
WILKINSON
EN	bad < awful < terrible < horrible
FR	mauvais < affreux < terrible < horrible
ES	malo < terrible < horrible < horrorso
EL	ακαύς < απαίσιος < τρομερός < υρικός
Table 1: Example translations from each dataset. "||" indicates adjectives at the same intensity level (ties).
Work on scalar adjectives has until now evolved around pre-compiled datasets (de Melo and Bansal, 2013; Taboada et al., 2011; Wilkinson and Oates, 2016; Cocos et al., 2018). Reliance on external resources has also restricted research to English, and has led to the prevalence of pattern-based and lexicon-based approaches. Recently, Gari Soler and Apidianaki (2020) showed that BERT representations (Devlin et al., 2019) encode intensity relationships between English scalar adjectives, paving the way for applying contextualised representations to intensity detection in other languages. $^{1}$
In our work, we explicitly address the scalar adjective identification task, overlooked until now due to the focus on pre-compiled resources. We furthermore propose to extend scalar adjective ranking to new languages. We make available two new benchmark datasets for scalar adjective identification and multilingual ranking: (a) SCAL-REL, a balanced dataset of relational and scalar adjectives which can serve to probe model representations for scalar adjective identification; and (b) MULTI-SCALE, a scalar adjective dataset in French, Spanish and Greek. In order to test contextual models
<sup>1</sup>de Melo and Bansal (2013) discuss the possibility of a pattern-based multilingual approach which would require the translation of English patterns (e.g., "X but not Y") into other languages.
Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 4653-4660 June 6-11, 2021. ©2021 Association for Computational Linguistics
on these two tasks, the adjectives need to be seen in sentential context. We thus provide, alongside the datasets, sets of sentences that can be used to extract contextualised representations in order to promote model comparability. We conduct experiments and report results obtained with simple baselines and state-of-the-art monolingual and multilingual models on these new benchmarks, opening up avenues for research on sentiment analysis and emotion detection in different languages.[2]
2 The Datasets
2.1 The MULTI-SCALE Dataset
We translate two English scalar adjective datasets into French, Spanish and Greek: DEMELO consists of 87 hand crafted half-scales $^3$  (de Melo and Bansal, 2013) and WILKINSON contains 12 full scales (Wilkinson and Oates, 2016). We use the partitioning of WILKINSON into 21 half-scales proposed by Cocos et al. (2018). In what follows, we use the term "scale" to refer to half-scales.
The two translators have (near-)native proficiency in each language. They were shown the adjectives in the context of a scale. This context narrows down the possible translations for polysemous adjectives to the ones that express the meaning described inside the scale. For example, the Spanish translations proposed for the adjective hot in the scales  $\{\text{warm} < \underline{\text{hot}}\}$  and  $\{\text{flavorful} < \text{zesty} < \text{hot} \parallel \text{spicy}\}$  are caliente and picante, respectively. Additionally, the translators were instructed to preserve the number of words in the original scales when possible. In some cases, however, they proposed alternative translations for English words, or none if an adequate translation could not be found. As a result, the translated datasets have a different number of words and ties. Table 1 shows examples of original English scales and their French, Spanish and Greek translations. Table 2 contains statistics on the composition of the translated datasets.
In order to test contextual models on the ranking task, we collect sentences containing the adjectives from OSCAR (Suárez et al., 2019), a multilingual corpus derived from CommonCrawl. French, Spanish and Greek are morphologically rich languages where adjectives need to agree with the noun they
# unordered pairs	# adjectives
DEMELO	EN	548 (524)	339 (293)
FR	590 (567)	350 (303)
ES	448 (431)	313 (275)
EL	557 (535)	342 (295)
WILKINSON	EN	61 (61)	59 (58)
FR	67 (67)	61 (60)
ES	59 (59)	58 (56)
EL	68 (68)	61 (58)
Table 2: Composition of the translated datasets. In parentheses, we give the number of unique adjectives and pairs.
modify. In order to keep the method resource-light, we gather sentences that contain the adjectives in their unmarked form.
For each scale  $s$ , we randomly select ten sentences from OSCAR where adjectives from  $s$  occur. Then, we generate additional sentences through lexical substitution. Specifically, for every sentence (context)  $c$  that contains an adjective  $a_i$  from scale  $s$ , we replace  $a_i$  with  $\forall a_j \in s$  where  $j = 1 \dots |s|$  and  $j \neq i$ . This process results in a total of  $|s| * 10$  sentences per scale and ensures that  $\forall a \in s$  is seen in the same ten contexts. For English, we use the ukWaC-Random set of sentences compiled by Garí Soler and Apidianaki (2020) which contains sentences randomly collected from the ukWaC corpus (Baroni et al., 2009).
2.2 The SCAL-REL Dataset
SCAL-REL contains scalar adjectives from the DEMELO, WILKINSON and CROWD (Cocos et al., 2018) datasets (i.e. 79 additional half-scales compared to MULTI-SCALE). We use all unique scalar adjectives in the datasets (443 in total), and subsample the same number of relational adjectives, which are labelled with the pertainym relationship in WordNet (Fellbaum, 1998). There are 4,316 unique such adjectives in WordNet, including many rare or highly technical terms (e.g., birefringent, anaphylactic).<sup>4</sup> Scalar adjectives in our datasets are much more frequent than these relational adjectives; their average frequency in Google Ngrams (Brants and Franz, 2006) is 27M and 1.6M, respectively. We balance the relational adjectives set by frequency, by subsampling 222 frequent and 221 rare adjectives. We use the mean frequency of the
4Note that the WordNet annotation does not cover all pertainyms in English (for example, frequent words such as ironic or seasonal are not marked with this relation).
2Our code and data are available at https://github. com/ainagari/scalar_adjs.
<sup>3</sup>A full scale (e.g., {hideous > ugly, pretty < beautiful < gorgeous} can be split into two half scales which contain antonyms, often expressing different polarity {hideous > ugly} and {pretty < beautiful < gorgeous}.
4,316 relational adjectives in Google Ngrams as a threshold. We propose a train/dev/test split of the SCAL-REL dataset (65/10/25%), observing a balance between the two classes (scalar and relational) in each set. To obtain contextualised representations, we collect for each relational adjective ten random sentences from ukWaC. For scalar adjectives, we use the ukWaC-Random set of sentences (cf. Section 2.1).
3 Multilingual Scalar Adjective Ranking
Models We conduct experiments with state-of-the-art contextual language models and several baselines on the MULTI-SCALE dataset. We use the pre-trained cased and uncased multilingual BERT model (Devlin et al., 2019) and report results of the best variant for each language. We also report results obtained with four monolingual models: bert-base-uncased (Devlin et al., 2019), flaubert_base_uncased (Le et al., 2020), bert-base-spanish-wwm-uncased (Cañete et al., 2020), and bert-base-greek-uncased-v1 (Koutsikakis et al., 2020). We compare to results obtained using fastText static embeddings in each language (Grave et al., 2018).
For a scale  $s$ , we feed the corresponding set of sentences to a model and extract the contextualised representations for  $\forall a \in s$  from every layer. When an adjective is split into multiple BPE units, we average the representations of all wordpieces (we call this approach "WP") or all pieces but the last one ("WP-1"). The intuition behind excluding the last WP is that the ending of a word often corresponds to a suffix with morphological information.
The DIFFVEC method We apply the adjective ranking method proposed by Garí Soler and Apidianaki (2020) to our dataset, which relies on an intensity vector (called  $\overrightarrow{dVec}$ ) built from BERT representations. The method yields state-of-the-art results with very little data; this makes it easily adaptable to new languages. We build a sentence specific intensity representation  $(\overrightarrow{dVec})$  by subtracting the vector of a mild intensity adjective,  $a_{mild}$  (e.g., smart), from that of  $a_{ext}$ , an extreme adjective on the same scale (e.g., brilliant) in the same context.
We create a  $dVec$  representation from every sentence available for these two reference adjectives, and average them to obtain the global  $\overrightarrow{dVec}$  for that pair. Gari Soler and Apidianaki (2020) showed that a single positive adjective pair (DIFFVEC-1 (+)) is enough for obtaining highly competitive results in English. We apply this method to the other languages using the translations of a positive English ( $a_{mild}, a_{ext}$ ) pair from the CROWD dataset: perfect-good. $^6$
Additionally, we learn two dataset specific representations: one by averaging the  $\overrightarrow{dVec}$ 's of all  $(a_{ext}, a_{mild})$  pairs in WILKINSON that do not appear in DEMELO (DIFFVEC-WK), and another one from pairs in DEMELO that are not in WILKINSON (DIFFVEC-DM). We rank adjectives in a scale by their cosine similarity to each  $\overrightarrow{dVec}$ : The higher the similarity, the more intense the adjective is.
Baselines We compare our results to a frequency and a polysemy baseline (FREQ and SENSE). These baselines rely on the assumption that low intensity words (e.g., nice, old) are more frequent and polysemous than their extreme counterparts (e.g., awesome, ancient). Extreme adjectives often limit the denotation of a noun to a smaller class of referents than mild intensity adjectives (Geurts, 2010). For example, an "awesome view" is more rare than a "nice view". This assumption has been confirmed for English in Gári Soler and Apidianaki (2020). FREQ orders words in a scale according to their frequency: Words with higher frequency have lower intensity. Given the strong correlation between word frequency and number of senses (Zipf, 1945), we also expect highly polysemous words (which are generally more frequent) to have lower intensity. This is captured by the SENSE baseline which orders the words according to their number of senses: Words with more senses have lower intensity.
Frequency is taken from Google Ngrams for English, and from OSCAR for the other three languages. The number of senses is retrieved from WordNet for English, and from BabelNet (Navigli and Ponzetto, 2012) for Spanish and French. For adjectives that are not present in BabelNet, we use a default value which corresponds to the average number of senses for adjectives in the dataset (DEMELO or WILKINSON) for which this information is available. We omit the SENSE baseline for
<sup>5</sup>Nine scalar adjectives from our datasets are also annotated as pertainyms in WordNet (e.g., skinny, microscopic) because they are denominal. We consider these adjectives to be scalar for our purposes since they clearly belong to intensity scales.
$^{6}\mathrm{FR}$  :parfait-bon,ES:perfecto-bueno,EL:  $\tau \varepsilon \lambda \varepsilon \iota \sigma \varsigma -x\alpha \lambda \varsigma \varsigma .$
<sup>7</sup>We omit Named Entities from BabelNet entries (e.g., names of TV shows or locations).
EN
Mono WP-1	FR
Mono WP-1	ES
Mono WP-1	EL
Mono WP-1
P-ACC	τ	ρavg	P-ACC	τ	ρavg	P-ACC	τ	ρavg	P-ACC	τ	ρavg
DM	DV-1 (+)	.6519	.4359	.4969	.6103	.3693	.3963	.6589	.3819	.4079	.5642	.2381	.2712
DV-WK	.5866	.2676	.3006	.5151	.1671	.1667	.6707	.4047	.4077	.5892	.2942	.3252
WK	DV-1 (+)	.8521	.7051	.8021	.6126	.2576	.2156	.8147	.6277	.8039	.6188	.2828	.2568
DV-DM	.91810	.83610	.85910	.6427	.3222	.3922	.7806	.5596	.6846	.75010	.56410	.58610
Multi WP-1	Multi WP	Multi WP	Multi (unc) WP
DM	DV-1 (+)	.6094	.3464	.3894	.5597	.2607	.3117	.6143	.2913	.2685	.5179	.1399	.1639
DV-WK	.5443	.2083	.2414	.51710	.17010	.17910	.61812	.30112	.30312	.5399	.1819	.2079
WK	DV-1 (+)	.8366	.6726	.7176	.6723	.3823	.3803	.7973	.5933	.6393	.66210	.3889	.4239
DV-DM	.8367	.6727	.7667	.7016	.4416	.4762	.69510	.39010	.51110	.6915	.4475	.5025
Static models and baselines
DM	DV-1 (+)	.637	.407	.458	.573	.288	.275	.656	.383	.421	.575	.266	.273
DV-WK	.599	.330	.406	.454	.033	-.006	.616	.298	.315	.549	.205	.217
FREQ	.575	.271	.283	.602	.346	.345	.585	.227	.239	.596	.306	.334	.
SENSE	.493	.163	.165	.512	.229	.185	.516	.139	.151	-	-	-	-
WK	DV-1 (+)	.787	.574	.663	.582	.197	.152	.695	.390	.603	.706	.464	.566
DV-DM	.852	.705	.783	.642	.325	.280	.712	.424	.547	.691	.447	.451
FREQ	.754	.508	.517	.567	.167	.148	.576	.153	.382	.676	.417	.427	.
SENSE	.721	.586	.575	.567	.255	.340	.644	.411	.456	-	-	-	-
Table 3: Results of the DIFFVEC (DV) method with monolingual (Mono) and multilingual (Multi) contextual models. Comparison to static embeddings and baselines per language. Subscripts denote the best layer. The best result obtained for each dataset in each language is indicated in boldface. For all languages but Greek, the multilingual model is cased.
Greek due to low coverage.8
We use evaluation metrics traditionally used for ranking evaluation (de Melo and Bansal, 2013; Cocos et al., 2018): Pairwise accuracy (P-ACC), Kendall's  $\tau$  and Spearman's  $\rho$ . Results on this task are given in Table 3. Monolingual models perform consistently better than the multilingual model, except for French. We report the best wordpiece approach for each model: WP-1 works better with all monolingual models and the multilingual model for English. Using all wordpieces (WP) is a better choice for the multilingual model in other languages. We believe the lower performance of WP-1 in these settings to be due to the fact that the multilingual BPE vocabulary is mostly English-driven; this naturally results in highly arbitrary partitions in these languages (e.g., ES: fantástico  $\rightarrow$  fantástico; EL: γιγάντος (gigantic)  $\rightarrow$  γ-ι-γ-ἀν-τος). Tokenisers of the monolingual models instead tend to split words in a way that more closely reflects the morphology of the language (e.g., ES: fantástico  $\rightarrow$  fantás-tico; EL: γιγάντος  $\rightarrow$  γιγά-ντι-ος. Detailed results are found in Appendix A.
We observe that DIFFVEC-1 (+) yields comparable and sometimes better results than DIFFVEC-DM and DIFFVEC-WK, which are built from multiple pairs. This is important especially in the multilingual setting, since it shows that just one pair of adjectives is enough for obtaining good results in a new language. The best layer varies across models and configurations. The monolingual French and Greek models generally obtain best results in earlier layers. A similar behaviour is observed for the multilingual model for English to some extent, whereas for the other models performance improves in the upper half of the Transformer network (layers 6-12). This shows that the semantic information relevant for adjective ranking is not situated at the same level of the Transformer in different languages. We plan to investigate this finding further in future work. The lower results in French can be due to the higher amount of ties present in the datasets compared to other languages.<sup>9</sup> The baselines obtain competitive results showing that the underlying linguistic intuitions hold across languages. The best models beat the baselines in all configurations except for Greek on the DEMELO dataset, where FREQ and static embeddings obtain higher results. Overall, results are lower than those
Only  $47\%$  of the Greek adjectives have a BabelNet entry, compared to  $95.7\%$  and  $88.9\%$  for Spanish and French. All English adjectives are present in WordNet.
$958\%$  of the French DEMELO scales contain a tie, compared to  $45\%$  in English.
Figure 1: Illustration of two scalar adjectives that are close to  $\overrightarrow{dVec}$  and to its opposite (which represents low intensity). The red vector describes a relational adjective that is perpendicular to  $\overrightarrow{dVec}$ .
reported for English, which shows that there is room for improvement in new languages.
4 Scalar Adjective Identification
For each English adjective in the SCAL-REL dataset, we generate a representation from the available ten sentences (cf. Section 2.2) using the bert-base-uncased model (with WP and WP-1). We experiment with a simple logistic regression classifier that uses the averaged representation for an adjective (ADJ-REP) as input and predicts whether it is scalar or relational. We also apply the DIFFVEC-1 (+) method to this task and measure how intense an adjective is by calculating its cosine with  $\overrightarrow{dVec}$ . The absolute value of the cosine indicates how clearly an adjective encodes the notion of intensity. In Figure 1, we show two scalar adjective vectors with negative and positive cosine similarity to  $\overrightarrow{dVec}$ , and another vector that is perpendicular to  $\overrightarrow{dVec}$ , i.e. describing a relational adjective for which the notion of intensity does not apply. $^{10}$  We train a logistic regression model to find a cosine threshold separating scalar from relational adjectives (DV-1 (+)). Finally, we also use as a feature the cosine similarity of the adjective representation to the vector of "good", which we consider as a prototypical scalar adjective (PROTOSIM).
The best BERT layer is selected based on the accuracy obtained on the development set. We report accuracy on the test set. The baseline classifiers only use frequency (FREQ) and polysemy (SENSE) as features. We use these baselines on SCAL-REL because the WordNet pertainyms included in the dataset are rarer than the scalar adjectives. The intuition behind the SENSE baseline explained in Section 3.1 also applies here.
Method	Accuracy
WP	WP-1
ADJ-REP (BERT)	0.9469	0.9429
PROTO-SIM	0.88811	0.90210
DV-1 (+)	0.5492	0.5452
ADJ-REP (fastText)	0.929
FREQ	0.669
SENSE	0.714
Table 4: Classification results on the SCAL-REL dataset.
Results on this task are given in Table 4. The classifier that relies on ADJ-REP BERT representations can distinguish the two types of adjectives with very high accuracy (0.946), closely followed by fastText embeddings (0.929). The DV-1 (+) method does not perform as well as the classifier based on ADJ-REP, which is not surprising since it relies on a single feature (the absolute value of the cosine between  $\overrightarrow{dVec}$  and ADJ-REP). Comparing ADJ-REP to a typical scalar word (PROTO-SIM) yields better results than DV-1 (+). The SENSE and FREQ baselines can capture the distinction to some extent. Relational adjectives in our training set are less frequent and have fewer senses on average (2.59) than scalar adjectives (5.30). A closer look at the errors of the best model reveals that these concern tricky cases: One of the four misclassified scalar adjectives is derived from a noun (microscopic), whilst five out of eight wrongly classified relational adjectives can have a scalar interpretation (e.g., sympathetic, imperative). Overall, supervised models obtain very good results on this task. SCALREL will enable research on unsupervised methods that could be used in other languages.
We propose a new multilingual benchmark for scalar adjective ranking, and set performance baselines on it using monolingual and multilingual contextual language model representations. Our results show that adjective intensity information is present in the contextualised representations in the studied languages. We also propose a new classification task and a dataset that can serve as a benchmark to estimate the models' capability to identify scalar adjectives when relevant datasets are not available. We make our datasets and sentence contexts available to promote future research on scalar adjectives detection and analysis in different languages.
To draw a parallel with gender debiasing, this value would reveal words' bias in the gender direction (Bolukbasi et al., 2016), regardless of the gender (male or female).
This work has been supported by the French National Research Agency under project ANR-16-CE33-0013. The work is also part of the FoTran project, funded by the European Research Coun
cil (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 771113). We thank the anonymous reviewers for their valuable suggestions.